* Creates a new function that constructs an instance of the given constructor function with the provided arguments. * * @param func - The constructor function to be wrapped and called. * @returns A new function that constructs an instance of the given constructor function with the provided argume
( Func: new (...args: any[]) => T )
| 103 | * @returns A new function that constructs an instance of the given constructor function with the provided arguments. |
| 104 | */ |
| 105 | function unconstruct<T>( |
| 106 | Func: new (...args: any[]) => T |
| 107 | ): (...args: any[]) => T { |
| 108 | return (...args: any[]): T => construct(Func, args); |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Add properties to a lookup table |