From: Dmitry Sharshakov Date: Mon, 28 Oct 2019 00:54:33 +0000 (+0300) Subject: feat(apiApp): return app from provide method for chaining (#393) X-Git-Tag: v3.0.0-alpha.0~294 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e581b14dff828f4fe6a465c53362982319f8db26;p=thirdparty%2Fvuejs%2Fcore.git feat(apiApp): return app from provide method for chaining (#393) --- diff --git a/packages/runtime-core/src/apiApp.ts b/packages/runtime-core/src/apiApp.ts index da3d50b96a..d7fa2b5a5f 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 } }