config: AppConfig
use(plugin: Plugin, ...options: any[]): this
mixin(mixin: ComponentOptions): this
- component(name: string): Component | undefined
- component(name: string, component: Component): this
+ component(name: string): PublicAPIComponent | undefined
+ component(name: string, component: PublicAPIComponent): this
directive(name: string): Directive | undefined
directive(name: string, directive: Directive): this
mount(
export interface AppContext {
config: AppConfig
mixins: ComponentOptions[]
- components: Record<string, Component>
+ components: Record<string, PublicAPIComponent>
directives: Record<string, Directive>
provides: Record<string | symbol, any>
reload?: () => void // HMR only
if (__DEV__ && context.components[name]) {
warn(`Component "${name}" has already been registered in target app.`)
}
- context.components[name] = component as Component
+ context.components[name] = component
return app
},