gcanti / io-ts

Runtime type system for IO decoding/encoding
https://gcanti.github.io/io-ts/
MIT License
6.68k stars 331 forks source link

Added int/uint types #681

Open LimitR opened 1 year ago

LimitR commented 1 year ago

Added int/uint type Before submitting a pull request, please make sure the following is done:

Note. If you find a typo in the documentation, make sure to modify the corresponding source (docs are generated).

LimitR commented 1 year ago

Created a constructor for int/uint types

const myTypeNumber = int(4);
const myNumber: myTypeNumber = 7;
// But
const myNumber: myTypeNumber = 8; // Error validation