( ctx: FailureContext | number | undefined, checker: Checker, data: any, k: PropertyKey, value: unknown )
| 693 | // with a ctx, a value is applied once, as arktype applies it, since a callback |
| 694 | // may see each call; one that transforms is checked first where arktype checks it |
| 695 | const failsValue = ( |
| 696 | ctx: FailureContext | number | undefined, |
| 697 | checker: Checker, |
| 698 | data: any, |
| 699 | k: PropertyKey, |
| 700 | value: unknown |
| 701 | ): boolean | undefined => |
| 702 | (ctx as FailureContext | undefined)?._e ? |
| 703 | appliesValues && checker.e ? checker.e(ctx, checker, value, k) |
| 704 | : appliesValues && checker.t?.e ? checker.t.e(ctx, checker, value, k) |
| 705 | : (!checker.t || |
| 706 | !(appliesValues && checker.a ? |
| 707 | // as arktype, a value reading its ctx is applied once where |
| 708 | // one only checks, as Allows does |
| 709 | !(ctx as any).chkOnly && checker.a(value, ctx, k) |
| 710 | : checker(value))) && |
| 711 | (ctx as FailureContext)._k(checker as CompactApply, data, k) |
| 712 | : !checker(value) |
| 713 | |
| 714 | // keys checked in declared order; a missing key expects its checker's |
| 715 | // description. A shape checking more than its keys walks them through this, |
no test coverage detected