diff --git a/packages/runtime-core/src/apiCreateApp.ts b/packages/runtime-core/src/apiCreateApp.ts index 73ecd8480d1..4f710511c7c 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -17,8 +17,8 @@ export interface App { 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( @@ -55,7 +55,7 @@ export interface AppConfig { export interface AppContext { config: AppConfig mixins: ComponentOptions[] - components: Record + components: Record directives: Record provides: Record reload?: () => void // HMR only @@ -168,7 +168,7 @@ export function createAppAPI( 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 },