miter
Version:
A typescript web framework based on ExpressJs based loosely on SailsJs
24 lines (23 loc) • 1.04 kB
TypeScript
import { CtorT } from '../../core/ctor';
export declare type SimpleDependencySource = CtorT<any> | string;
export declare type DependencySource = SimpleDependencySource | (() => SimpleDependencySource);
export declare type CallbackSource<T> = {
useCallback: {
(...args: any[]): T;
};
cache?: boolean;
deps?: DependencySource[];
};
export declare type ValueSource<T> = {
useValue: T;
};
export declare type ClassSource<T, TImpl extends T> = {
useClass: CtorT<TImpl>;
};
export declare type ProvideMetadataSelector<T> = {
provide: CtorT<T>;
};
export declare type ProvideMetadataCallbackSource<T> = ProvideMetadataSelector<T> & CallbackSource<T>;
export declare type ProvideMetadataValueSource<T> = ProvideMetadataSelector<T> & ValueSource<T>;
export declare type ProvideMetadataClassSource<T, TImpl extends T> = ProvideMetadataSelector<T> & ClassSource<T, TImpl>;
export declare type ProvideMetadata<T> = ProvideMetadataClassSource<T, any> | ProvideMetadataValueSource<T> | ProvideMetadataCallbackSource<T>;