|
|
|
|
|
by wk_end
1366 days ago
|
|
You can use io-ts [0] to define your types, and it'll generate functions to typecheck for you. Syntactically it's a bit gnarly and the documentation isn't great; a first-party solution would definitely be nicer. But it works, and it's amazing that it works. [0] https://github.com/gcanti/io-ts |
|