typedefs / pm

project management
GNU Affero General Public License v3.0
0 stars 0 forks source link

Generate JS validation code #12

Open wires opened 6 years ago

wires commented 6 years ago

WIP

leverage https://github.com/hapijs/joi

something like this

const x = {a:123, b: "x"}
const T = new Typedefs(`
type Foo =
  a : Int * b : String
`)
xT = T.foo.validate(x)