* 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 )
| 98 | * @returns A new function that constructs an instance of the given constructor function with the provided arguments. |
| 99 | */ |
| 100 | function unconstruct<T>( |
| 101 | Func: new (...args: any[]) => T |
| 102 | ): (...args: any[]) => T { |
| 103 | return (...args: any[]): T => construct(Func, args); |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * Add properties to a lookup table |