(prop: Prop.Node, checker: string)
| 797 | // a required key's checker, wrapped where what the missing key expects or says |
| 798 | // isn't what its value's checker does |
| 799 | const writeRequired = (prop: Prop.Node, checker: string): string => { |
| 800 | const { description, message, c } = missingOf(prop)! |
| 801 | const held = checkerDescriptionOf(prop.value) |
| 802 | const said = combines(prop.value) ? saidByNode.get(prop.value) : undefined |
| 803 | if (message === undefined) { |
| 804 | return held === description && !said ? |
| 805 | checker |
| 806 | : writeCall("required", checker, JSON.stringify(description)) |
| 807 | } |
| 808 | // what its value's checker says is its Type's message, not one the code's |
| 809 | if (held === description && said?.message === message && c === 1) |
| 810 | return checker |
| 811 | return writeCall( |
| 812 | "sayingMissing", |
| 813 | checker, |
| 814 | JSON.stringify(message), |
| 815 | // a message configured for the code is noted on the missing key's issue |
| 816 | c === 1 ? undefined : "runtime.codedIssue", |
| 817 | held === description ? undefined : JSON.stringify(description) |
| 818 | ) |
| 819 | } |
| 820 | |
| 821 | const writeStructure = ( |
| 822 | js: CombinatorCompiler, |
no test coverage detected