magic-js
magic-js copied to clipboard
Add a runtime type-checker to improve DX
✅ Prerequisites
- [x] Did you perform a cursory search of open issues? Is this feature already requested elsewhere?
- [x] Are you reporting to the correct repository (
magic-sdk
)?
✨ Feature Request
I would like to explore the usage of io-ts
to improve developer experience by reporting type errors at runtime. My preference would be that this is an optional feature, possibly hidden behind a special debug
flag.
🧩 Context
Not everyone has entered into the TypeScript fold, though it continues to grow in popularity. Most IDEs will support IntelliSense for TypeScript definitions in JS files, but the experience is not equal to writing TypeScript natively. Mistakes are still possible. To help with developer on-boarding and to ease the learning curve of new APIs, we can implement runtime type checks.