(node, operator)
| 215 | // The parser hangs a control operator on a type entry, a field, or a definition. A numeric one |
| 216 | // bounds the projected node; any other (`.default` …) does not change the type. |
| 217 | function withOperator(node, operator) { |
| 218 | const bound = BOUND_OPERATORS[operator?.Type] |
| 219 | if (!bound) return node |
| 220 | const value = boundValue(operator.Value) |
| 221 | return value === undefined ? { primitive: 'unknown' } : narrow(node, bound, value) |
| 222 | } |
| 223 | |
| 224 | function projectEntry(e) { |
| 225 | if (typeof e === 'string') return { primitive: PRIMITIVES[e] ?? e } |
no test coverage detected