4 ms·
io-ts[1] is a great solution for implementing runtime-types. The most interesting feature is that the static type can be "extracted" out of the runtime type so
by lf-non 8y ago
io-ts[1] is a great solution for implementing runtime-types. The most interesting feature is that the static type can be "extracted" out of the runtime type so in most cases there is no duplication of information between runtime type and static type.
[1] https://github.com/gcanti/io-ts https://github.com/gcanti/io-ts