@zuu/owl
Version:
Zuu's Experimental GraphQL Implementation
23 lines (22 loc) • 746 B
TypeScript
export declare type SupportedType<T> = {
new (...args: any[]): T;
} | Function;
export interface UseContainerOptions {
fallback?: boolean;
fallbackOnErrors?: boolean;
}
export declare abstract class IOCContainer {
static userContainer?: {
get<T>(someClass: SupportedType<T>): T;
};
static userContainerOptions: UseContainerOptions;
private static defaultContainer;
static restoreDefault(): void;
static useContainer(iocContainer: {
get(someClass: any): any;
}, options?: UseContainerOptions): void;
static getInstance<T = any>(someClass: SupportedType<T>): T;
}
export declare function useContainer(iocContainer: {
get(someClass: any): any;
}, options?: UseContainerOptions): void;