root-systems / dogstack

:dog: :dog: :dog: a popular-choice grab-bag framework for teams working on production web apps
https://dogstack.js.org/
24 stars 7 forks source link

question: do we want static type checking? #47

Closed ahdinosaur closed 6 years ago

ahdinosaur commented 7 years ago

using FlowType or TypeScript or neither?

ahdinosaur commented 7 years ago

if we go with json schema:

ahdinosaur commented 7 years ago

or tcomb:

ahdinosaur commented 7 years ago

or what looks to be the successor to tcomb:

simontegg commented 7 years ago

Another type checking solution https://github.com/maiavictor/forall

simontegg commented 7 years ago

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