diff --git a/packages/runtime-core/src/apiApp.ts b/packages/runtime-core/src/apiApp.ts index da3d50b9..d7fa2b5a 100644 --- a/packages/runtime-core/src/apiApp.ts +++ b/packages/runtime-core/src/apiApp.ts @@ -21,7 +21,7 @@ export interface App { rootContainer: HostElement | string, rootProps?: Data ): ComponentPublicInstance - provide(key: InjectionKey | string, value: T): void + provide(key: InjectionKey | string, value: T): this } export interface AppConfig { @@ -169,6 +169,8 @@ export function createAppAPI( // TypeScript doesn't allow symbols as index type // https://github.com/Microsoft/TypeScript/issues/24587 context.provides[key as string] = value + + return app } }