Y
Hacker News
new
|
ask
|
show
|
jobs
by
mbildner
1864 days 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