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

Function writeDroppedKeys

ark/type/standalone/sites.ts:113–117  ·  view source on GitHub ↗
(
	fn: Function,
	{ methods, keys }: DroppedReportKeys
)

Source from the content-addressed store, hash-verified

111// e.g. "the `flags` key isUnique passes to ctx.reject()", whose name the build
112// prints as the function's source
113const writeDroppedKeys = (
114 fn: Function,
115 { methods, keys }: DroppedReportKeys
116): string =>
117 `the ${listed(keys.map(k => `\`${k}\``))} ${keys.length > 1 ? "keys" : "key"} \`${functionNameOf(fn)}\` passes to ${listed(methods.map(method => `ctx.${method}()`))}`
118
119const raisableCodesByRoot = new WeakMap<BaseRoot, "any" | Set<ArkErrorCode>>()
120

Callers 1

assertKeepsReportKeysFunction · 0.85

Calls 3

functionNameOfFunction · 0.90
listedFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected