types: massive refactor

This commit is contained in:
Evan You
2019-10-22 11:26:48 -04:00
parent 522beaa766
commit b5886189ba
21 changed files with 308 additions and 258 deletions

View File

@@ -27,7 +27,10 @@ export function provide<T>(key: InjectionKey<T> | string, value: T) {
export function inject<T>(key: InjectionKey<T> | string): T | undefined
export function inject<T>(key: InjectionKey<T> | string, defaultValue: T): T
export function inject(key: InjectionKey<any> | string, defaultValue?: any) {
export function inject(
key: InjectionKey<any> | string,
defaultValue?: unknown
) {
if (currentInstance) {
const provides = currentInstance.provides
if (key in provides) {