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

Method allowsReadOf

ark/aot/link.ts:1246–1259  ·  view source on GitHub ↗
(
		reader: Unit,
		validator: string,
		imports: Map<string, string>
	)

Source from the content-addressed store, hash-verified

1244
1245 // read as a call: a bundler keeps any property read of a declaration it otherwise drops
1246 private allowsReadOf(
1247 reader: Unit,
1248 validator: string,
1249 imports: Map<string, string>
1250 ): string | undefined {
1251 const runtime = this.localOf(
1252 reader,
1253 "runtime",
1254 "* as",
1255 "arktype/runtime",
1256 imports
1257 )
1258 return runtime && `/* @__PURE__ */ ${runtime}.allowsOf(${validator})`
1259 }
1260
1261 private declareAsCreated(
1262 binding: Binding,

Callers 2

declareCreatedMethod · 0.95
inlineMethod · 0.95

Calls 1

localOfMethod · 0.95

Tested by

no test coverage detected