(def, ctx)
| 513 | // a tuple's predicate is a .narrow(), so it checks the output, after any |
| 514 | // morphs and defaults, and a morph pipes to it |
| 515 | export const parseNarrowTuple: IndexOneParser<":"> = (def, ctx) => { |
| 516 | assertTupleArity(def, ":", 3) |
| 517 | if (typeof def[2] !== "function") { |
| 518 | return throwParseError( |
| 519 | writeMalformedFunctionalExpressionMessage(":", def[2]) |
| 520 | ) |
| 521 | } |
| 522 | return ctx.$.parseOwn(def[0], ctx).rawConstrainOut( |
| 523 | "predicate", |
| 524 | def[2] as Predicate |
| 525 | ) |
| 526 | } |
| 527 | |
| 528 | const parseMetaTuple: IndexOneParser<"@"> = (def, ctx) => { |
| 529 | assertTupleArity(def, "@", 3, 4) |
nothing calls this directly
no test coverage detected