MCPcopy
hub / github.com/tldraw/tldraw / wrappedFn

Function wrappedFn

packages/utils/src/lib/function.ts:25–34  ·  view source on GitHub ↗
(...args: Args)

Source from the content-addressed store, hash-verified

23 fn: (...args: Args) => Return
24): (...args: Args) => Return {
25 const wrappedFn = (...args: Args) => {
26 try {
27 return fn(...args)
28 } catch (error) {
29 if (error instanceof Error && Error.captureStackTrace) {
30 Error.captureStackTrace(error, wrappedFn)
31 }
32 throw error
33 }
34 }
35
36 return wrappedFn
37}

Callers

nothing calls this directly

Calls 1

fnFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…