nowjs-core
Version:
NowCanDo Javascript Core [nowjs-core] is a library written by TypeScript code maintains under Apache 2.0 licence
20 lines (19 loc) • 815 B
TypeScript
import { IProvider } from './index';
export declare type ProviderFactory = IProvider | ((...args: any[]) => IProvider);
export interface ProviderManagerItem {
provider: ProviderFactory;
isDefault: boolean;
arguments?: any[];
}
export declare class ProviderManager {
private static providers;
static add(type: string, name: string, provider: ProviderFactory, isDefault: boolean, args?: any[]): ProviderManager;
static clear(type: string): void;
static hasAnyProvider(type: string): boolean;
static count(): number;
static countByType(type: string): number;
static getNames(): string[];
static getNamesByType(type: string): string[];
static remove(type: string, name: string): boolean;
static get<TResult extends IProvider>(type: string, name?: string): TResult;
}