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

Class Invalid

ark/type/runtime.ts:1192–1211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1190export const InvalidErrors: new (data: unknown) => ArkErrors =
1191 /* @__PURE__ */ (() => {
1192 class Invalid {
1193 declare _d: unknown
1194 declare _f?: ArkIssue[]
1195
1196 constructor(data: unknown) {
1197 this._d = data
1198 }
1199
1200 get _(): ArkIssue[] {
1201 return (this._f ??= [
1202 {
1203 code: "predicate",
1204 path: [],
1205 data: this._d,
1206 expected: "valid",
1207 message: "is invalid"
1208 }
1209 ])
1210 }
1211 }
1212 setPrototypeOf(Invalid.prototype, ArkErrors.prototype)
1213 // keeps the prototype's own constructor, still not enumerable
1214 Invalid.prototype.constructor = ArkErrors

Callers 1

unit.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected