Hacker News new | past | comments | ask | show | jobs | submit login

What I was most curious about was how they achieved run-time type checking in TypeScript.

In this case, it was done by code generation using: https://github.com/bcherny/json-schema-to-typescript

Personally, I'd prefer a way that doesn't involve another build step.

A popular library I've often seen mentioned is io-ts: https://github.com/gcanti/io-ts

One that I've taken a liking to, backed by ajv for JSON schema validation, is: https://github.com/andnp/ValidTyped




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: