(min, max, inclusive = true)
| 225 | describe('numeric bounds', () => { |
| 226 | const num = (v) => ({ Type: 'literal', Value: v, Unwrapped: false, IsFloat: true }) |
| 227 | const range = (min, max, inclusive = true) => ({ |
| 228 | Type: 'range', |
| 229 | Value: { Inclusive: inclusive, Min: lit(min), Max: lit(max) }, |
| 230 | }) |
| 231 | const op = (type, value) => ({ Type: type, Value: num(value) }) |
| 232 | const fieldType = (type, extra = {}) => |
| 233 | projectSchema([group('x.R', [{ ...field('n', type), ...extra }])], {}).types['x.R'].fields[0].type |