UNPKG

661 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 interface Constructor<T> {
9 new (): T;
10}
11/**
12 * A no-arg constructor or a no-arg function that can create
13 * type T
14 */
15export declare type Maker<T> = Factory<T> | Constructor<T>;
16/**
17 * Convert a factory function with no arguments or a class with a no arg
18 * constructor to a factory function
19 * @param {Maker<T>} fact
20 * @return {Factory<T>}
21 */
22export declare function toFactory<T>(fact: Maker<T>): Factory<T>;
23//# sourceMappingURL=constructionUtils.d.ts.map
\No newline at end of file