gcanti/io-ts
View on GitHub ↗ ★ 6,810 TypeScript
Runtime type system for IO decoding/encoding
61 mentions on Hacker News by 40 people: 2 stories, 59 comments · first 2017-04-12 · latest 2022-09-23
20082026
-
I use https://github.com/gcanti/io-ts for the runtime checking. It is similar to tcomb (same author)! You can even define the type via io-ts and then make a TypeScript interface out of it! Given this, and the other libraries that do…
comment by hermanradtke · 2019-05-30 · in TypeScript 3.5 -
…checking that library out for anyone who knows about DDD or wants to abstract their mapping code. https://github.com/gcanti/io-ts
comment by dfee · 2019-04-07 · in Value Objects – DDD with TypeScript -
…so in most cases there is no duplication of information between runtime type and static type. [1] https://github.com/gcanti/io-ts
comment by lf-non · 2019-01-23 · in TypeScript Tricks: Type Guards -
…and there’s a lot less pointless type check unit tests due to the guarantee’s it gives us. io-ts ( https://github.com/gcanti/io-ts ) around rest endpoints checking json input as well has been a godsend.
comment by bazza451 · 2018-09-02 · in TypeScript at Google -
…with the design goals of TS, but check out io-ts[0] for a library approach to this problem. [0] https://github.com/gcanti/io-ts
comment by Stoids · 2018-07-30 · in Announcing TypeScript 3.0 -
…mostly true, but some projects exist that allow a subset of interfaces to be used at runtime: - https://github.com/gcanti/io-ts - https://github.com/fabiandev/ts-runtime - https://github.com/codemix/flow-runtime - Or just manual…
comment by zbentley · 2018-02-18 · in JSON Schema -
…a limited assertion facility, but it's not nearly as capable as JSON-schema. Projects like io-ts ( https://github.com/gcanti/io-ts ) add more functionality to those assertions, but they're still much less easy to use, in my opinion, than…
comment by zbentley · 2018-02-18 · in JSON Schema -
You might be interested in this: https://github.com/gcanti/io-ts and many related projects by Giulio.
comment by joe-stanton · 2018-01-16 · in Convert React JavaScript Code to TypeScript with Proper Typing -
…bit of work in this area that leverages Flow type syntax, e.g: - https://github.com/gcanti/tcomb - https://github.com/gcanti/io-ts (for typescript) - https://github.com/codemix/flow-runtime (i wrote this) And another alternative is to use…
comment by phpnode · 2017-04-22 · in Forall.js: Idris-like static types and invariant checks for JavaScript -
You could write the runtime definition and extract the static types from that https://github.com/gcanti/io-ts
comment by gcanti · 2017-04-12 · in TypeScript at Slack -
This is a TypeScript compatible runtime type system for IO validation https://github.com/gcanti/io-ts
comment by gcanti · 2017-04-12 · in TypeScript at Slack