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

Function keptAnnotationsIn

ark/aot/flat.ts:617–624  ·  view source on GitHub ↗
(
	module: SourceModule,
	kept: KeptCode
)

Source from the content-addressed store, hash-verified

615
616// oxc's minifier keeps the annotations of creations kept code reads
617const keptAnnotationsIn = (
618 module: SourceModule,
619 kept: KeptCode
620): [start: number, end: number][] =>
621 keptCallsIn(module, kept).flatMap(({ call }) => {
622 const annotation = pureAnnotationOf(module.source, call)
623 return annotation ? [[call.start - annotation.length, call.start]] : []
624 })
625
626// whether a rewritten site's creation is one its scan found, which the function makes
627const createsSame = (

Callers 1

flatSiteOfFunction · 0.85

Calls 2

pureAnnotationOfFunction · 0.90
keptCallsInFunction · 0.85

Tested by

no test coverage detected