MCPcopy Create free account
hub / github.com/arktypeio/arktype / isSkippedFunction

Function isSkippedFunction

ark/aot/usage.ts:1792–1804  ·  view source on GitHub ↗
(
	fn: Node,
	module: SourceModule,
	ctx: ThisReadsContext
)

Source from the content-addressed store, hash-verified

1790// `thisReadsOf`: class constructors, non-detached class/ES5-prototype methods,
1791// and provably unreferenced top-level functions in non-entry modules
1792const isSkippedFunction = (
1793 fn: Node,
1794 module: SourceModule,
1795 ctx: ThisReadsContext
1796): boolean => {
1797 const cached = ctx.skippedCache.get(fn)
1798 if (cached !== undefined) return cached
1799 // provisionally false while computing to prevent any cycle from skipping unsafely
1800 ctx.skippedCache.set(fn, false)
1801 const result = computeSkippedFunction(fn, module, ctx)
1802 ctx.skippedCache.set(fn, result)
1803 return result
1804}
1805
1806const computeSkippedFunction = (
1807 fn: Node,

Callers 3

thisReadsOfFunction · 0.85
isForwardingCalleeFunction · 0.85
isForwardingBindingFunction · 0.85

Calls 3

computeSkippedFunctionFunction · 0.85
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected