MCPcopy
hub / github.com/cure53/DOMPurify / unconstruct

Function unconstruct

src/utils.ts:94–98  ·  view source on GitHub ↗

* 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
)

Source from the content-addressed store, hash-verified

92 * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
93 */
94function unconstruct<T>(
95 Func: new (...args: any[]) => T
96): (...args: any[]) => T {
97 return (...args: any[]): T => construct(Func, args);
98}
99
100/**
101 * Add properties to a lookup table

Callers 1

utils.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…