2 ms·
This is not yet possible in Typescript, but imagine if you could define a numerical subtype that requires your input be below some threshold eg: `type Limit =
by mbildner 5y ago
This is not yet possible in Typescript, but imagine if you could define a numerical subtype that requires your input be below some threshold eg:
`type Limit = 0..100;`
See discussion here: https://github.com/Microsoft/TypeScript/issues/15480 https://github.com/Microsoft/TypeScript/issues/15480