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(name: string, component: Component<any, any, any, ComputedOptions, MethodOptions, {}, any> | DefineComponent<{}, {}, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{}>>, {}, {}>): this;
    directive<T, V>(name: string): undefined | vue.Directive<T, V>;
    directive<T, V>(name: string, directive: vue.Directive<T, V>): this;
    filter?(name: string): undefined | Function;
    filter?(name: string, filter: Function): this;
    mixin(mixin: ComponentOptions<{}, any, any, any, any, any, any, any, any>): this;
    mount(rootContainer: string | HostElement, isHydrate?: boolean, namespace?: boolean | ElementNamespace): ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>;
    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

  • Type Parameters

    • T = any
    • V = any

    Parameters

    • name: string

    Returns undefined | vue.Directive<T, V>

  • Type Parameters

    • T = any
    • V = any

    Parameters

    Returns this

  • v2 compat only

    Parameters

    • name: string

    Returns undefined | Function

  • Parameters

    • name: string
    • filter: Function

    Returns this

  • Parameters

    Returns this

  • 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