(root: BaseRoot)
| 84 | // a key a narrow or morph passes its ctx's reject() or error(), which arktype's |
| 85 | // error keeps, would be on it in development and gone from it in production |
| 86 | const assertKeepsReportKeys = (root: BaseRoot): void => { |
| 87 | for (const unit of rootUnitsOf(root)) { |
| 88 | for (const node of unit.declared) { |
| 89 | const fns = |
| 90 | node.is("predicate") ? [node.predicate] |
| 91 | : node.is("morph") ? node.morphs |
| 92 | : [] |
| 93 | for (const fn of fns) { |
| 94 | const dropped = |
| 95 | typeof fn === "function" ? dropsReportKeys.get(fn) : undefined |
| 96 | if (dropped) { |
| 97 | throwParseError( |
| 98 | writeUnprecompilableMessage(writeDroppedKeys(fn, dropped)) |
| 99 | ) |
| 100 | } |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | const listed = (items: readonly string[]): string => |
| 107 | items.length > 1 ? |
no test coverage detected