gcanti / io-ts

Runtime type system for IO decoding/encoding
https://gcanti.github.io/io-ts/
MIT License
6.7k stars 328 forks source link

Add usage to Readme #649

Closed koenigstag closed 1 year ago

koenigstag commented 2 years ago

Added simple usage block

import * as t from 'io-ts'

const User = t.type({
  userId: t.number,
  name: t.string
})
EricCrosson commented 2 years ago

Is this not already covered by the "Example" section of this page? https://github.com/gcanti/io-ts/blob/master/index.md