* 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 )
| 83 | * @returns A new function that constructs an instance of the given constructor function with the provided arguments. |
| 84 | */ |
| 85 | function unconstruct<T>( |
| 86 | Func: new (...args: any[]) => T |
| 87 | ): (...args: any[]) => T { |
| 88 | return (...args: any[]): T => construct(Func, args); |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * Add properties to a lookup table |