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

Function assertNoProblemConfig

ark/schema/config.ts:176–188  ·  view source on GitHub ↗
(
	config: ArkSchemaConfig | undefined
)

Source from the content-addressed store, hash-verified

174 * JavaScript still passes, and which would otherwise be kept and never read
175 */
176export const assertNoProblemConfig = (
177 config: ArkSchemaConfig | undefined
178): void => {
179 for (const k in config) {
180 const ofCode: unknown = config[k as never]
181 if (
182 (isNodeKind(k) || k === "undeclared" || k === "discriminant") &&
183 hasDomain(ofCode, "object") &&
184 "problem" in ofCode
185 )
186 throwParseError(removedProblemMessage)
187 }
188}
189
190const maxFirstTypeLength = 80
191

Callers 2

constructorFunction · 0.90
configureSchemaFunction · 0.85

Calls 3

isNodeKindFunction · 0.90
hasDomainFunction · 0.90
throwParseErrorFunction · 0.90

Tested by

no test coverage detected