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

Function failsAtBasis

ark/schema/shared/errors.ts:716–720  ·  view source on GitHub ↗
(error: ArkError, path: array<PropertyKey>)

Source from the content-addressed store, hash-verified

714const basesByUnion = new WeakMap<ArkError, readonly ArkError[]>()
715
716const failsAtBasis = (error: ArkError, path: array<PropertyKey>): boolean =>
717 (error.code === "domain" ||
718 error.code === "proto" ||
719 error.code === "unit") &&
720 pathEquals(error.path, path)
721
722/**
723 * Writes an error's `message` in `locale`: what `error.message` would be had

Callers 1

errorFromUnionFunction · 0.85

Calls 1

pathEqualsFunction · 0.85

Tested by

no test coverage detected