Comparing version 0.0.8 to 0.0.9
@@ -1,4 +0,4 @@ | ||
export declare class InjectionToken { | ||
readonly token: string; | ||
constructor(token: string); | ||
export declare class InjectionToken<T> { | ||
readonly token: T; | ||
constructor(token: T); | ||
} |
@@ -0,4 +1,6 @@ | ||
import { Type } from './type'; | ||
import { InjectionToken } from './injection-token'; | ||
export declare abstract class Injector { | ||
abstract parentInjector: Injector; | ||
abstract get<T>(token: any, notFoundValue?: any): T; | ||
abstract get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T): T; | ||
} |
import { Provider } from './provider'; | ||
import { Injector } from './injector'; | ||
import { Type } from './type'; | ||
import { InjectionToken } from './injection-token'; | ||
export declare class ReflectiveInjector extends Injector { | ||
@@ -9,4 +11,4 @@ parentInjector: Injector; | ||
constructor(parentInjector: Injector, staticProviders: Provider[]); | ||
get<T>(token: any, notFoundValue?: any): T; | ||
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T): T; | ||
private resolveDeps; | ||
} |
{ | ||
"name": "@tanbo/di", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "A dependency injection Library", | ||
@@ -5,0 +5,0 @@ "main": "./bundles/public-api.js", |
19890
571