fp-ts [1] contains an implementation of Higher Kinded Types, which TypeScript doesn’t support natively (the idea for emulating higher kinded types in TypeScript is based on "Lightweight higher-kinded polymorphism" [2])
I'm working on a babel plugin [1] that should make the migration even more gradual. At the end of the process you get both static and runtime type safety.
Yep. However static and runtime type checking are not mutually exclusive. Actually there's a TypeScript definition file included in the repo. Moreover such a runtime type checking brings additional features like refinement types and runtime type introspection
- works with regular objects and arrays
- runtime type checks
- easy debugging with Chrome DevTools
- immutability and immutability helpers
- runtime type introspection
- easy JSON serialization / deseralization
- pattern matching
> They often need to build forms quickly and a lot of them
I wrote a library specifically with this goal: https://github.com/gcanti/tcomb-form.
React.js + Bootstrap + ARIA support. Maybe it could be integrated with react-ui-builder
Interesting: here the key point is composability.
I wrote a validation library in the same vein but using functions as representations of sets
https://github.com/gcanti/tcomb-validation
[1] https://github.com/gcanti/fp-ts [2] https://www.cl.cam.ac.uk/~jdy22/papers/lightweight-higher-ki...