Interface App<HostElement>

interface App<HostElement> {
    _component: ConcreteComponent<{}, any, any, ComputedOptions, MethodOptions, {}, any>;
    _container: null | HostElement;
    _context: AppContext;
    _instance: null | ComponentInternalInstance;
    _props: null | Data;
    _uid: number;
    config: AppConfig;
    version: string;
    component(name: string): undefined | Component<any, any, any, ComputedOptions, MethodOptions, {}, any>;
    component<T>(name: string, component: T): this;
    directive<HostElement, Value, Modifiers, Arg>(name: string): undefined | vue.Directive<HostElement, Value, Modifiers, Arg>;
    directive<HostElement, Value, Modifiers, Arg>(name: string, directive: vue.Directive<HostElement, Value, Modifiers, Arg>): this;
    filter?(name: string): undefined | Function;
    filter?(name: string, filter: Function): this;
    mixin(mixin: ComponentOptions<{}, any, any, any, any, any, any, any, string, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>): this;
    mount(rootContainer: string | HostElement, isHydrate?: boolean, namespace?: boolean | ElementNamespace, vnode?: VNode<RendererNode, RendererElement, {
        [key: string]: any;
    }>): ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any>;
    onUnmount(cb: (() => void)): void;
    provide<T, K>(key: K, value: K extends InjectionKey<V>
        ? V
        : T): this;
    runWithContext<T>(fn: (() => T)): T;
    unmount(): void;
    use<Options>(plugin: vue.Plugin<Options>, ...options: Options): this;
    use<Options>(plugin: vue.Plugin<Options>, options: Options): this;
}

Type Parameters

  • HostElement = any

Properties

_component: ConcreteComponent<{}, any, any, ComputedOptions, MethodOptions, {}, any>
_container: null | HostElement
_context: AppContext
_instance: null | ComponentInternalInstance
_props: null | Data
_uid: number
config: AppConfig
version: string

Methods

  • v2 compat only

    Parameters

    • name: string

    Returns undefined | Function

  • Parameters

    • name: string
    • filter: Function

    Returns this

  • Parameters

    Returns this

  • Parameters

    • cb: (() => void)
        • (): void
        • Returns void

    Returns void

  • Type Parameters

    Parameters

    Returns this

  • Runs a function with the app as active instance. This allows using of inject() within the function to get access to variables provided via app.provide().

    Type Parameters

    • T

    Parameters

    • fn: (() => T)

      function to run with the app as active instance

        • (): T
        • Returns T

    Returns T

  • Returns void

  • Type Parameters

    • Options extends unknown[]

    Parameters

    Returns this

  • Type Parameters

    • Options

    Parameters

    Returns this