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

Function warnOnce

ark/type/runtimeDevelopment.ts:114–118  ·  view source on GitHub ↗
(member: string, message: string)

Source from the content-addressed store, hash-verified

112// once for each member, with the stack of the code reading it. Counted once
113// logged, so where console.warn throws, as a test's may, each read throws
114const warnOnce = (member: string, message: string) => {
115 if (printing || warned.has(member)) return
116 console.warn(new Error(message))
117 warned.add(member)
118}
119
120// A read of a member a validator lacks warns rather than throws, and reads
121// undefined as in production, so code testing whether a validator has a

Callers 1

Calls 2

hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected