Skip to content

Commit f585005

Browse files
committed
fix(type): add overlaod signature for inject()
Resolves: #83
1 parent e5eaebd commit f585005

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/apis/inject.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export function provide<T>(key: InjectionKey<T> | string, value: T): void {
3232
vm._provided[key as string] = value;
3333
}
3434

35+
export function inject<T>(key: InjectionKey<T> | string): T | void;
3536
export function inject<T>(key: InjectionKey<T> | string, defaultValue: T): T;
3637
export function inject<T>(key: InjectionKey<T> | string, defaultValue?: T): T | void {
3738
if (!key) {

0 commit comments

Comments
 (0)