UNPKG

660 BTypeScriptView Raw
1/**
2 * Interface for a no-arg function that can create an instance of the given type
3 */
4export declare type Factory<T> = () => T;
5/**
6 * Interface for objects with a no-arg constructor
7 */
8export declare type Constructor<T> = new () => T;
9/**
10 * A no-arg constructor or a no-arg function that can create
11 * type T
12 */
13export declare type Maker<T> = Factory<T> | Constructor<T>;
14/**
15 * Convert a factory function with no arguments or a class with a no arg
16 * constructor to a factory function
17 * @param {Maker<T>} fact
18 * @return {Factory<T>}
19 */
20export declare function toFactory<T>(fact: Maker<T>): Factory<T>;
21//# sourceMappingURL=constructionUtils.d.ts.map
\No newline at end of file