Closed ahdinosaur closed 6 years ago
if we go with json schema:
or what looks to be the successor to tcomb:
Another type checking solution https://github.com/maiavictor/forall
After reading the the forall
you could have a runtime type checking in plain js then just use dead code elimination for your production builds to remove it.
The gen-io-ts
approach is pretty flexible and like the idea of defining types in jsonschema or swagger. Dogstack projects wouldn't have to adopt TypeScript but they easily could if they wanted.
I also see benefits in defining entity types in jsonschema as the source of type truth and leveraging the schema for an auto CRUD form interface builder a la Rails or Phoenix
using FlowType or TypeScript or neither?