MCPcopy Create free account
hub / github.com/cure53/dompurify / unconstruct

Function unconstruct

src/utils.ts:85–89  ·  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

83 * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
84 */
85function 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

Callers 1

utils.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected