YPSKA #10 Runtypes

github logo ・1 min read

You should probably know about... (17 Part Series)

1) YSPKA #1: Pulumi 2) You should probably know about... 3 ... 15 3) YSPKA #2: gRPC 4) YSPKA #3: Dapr 5) YSPKA #4: Plop JS 6) YPSKA #5 Next.js 7) YPSKA #7 Static site generators 8) YPSKA #8 Headless CMS 9) YPSKA #9 Svelte 10) YPSKA #10 Runtypes 11) YPSKA #11 GROQ 12) YPSKA #12 Immer 13) YPSKA #13 Rollup 14) YPSKA #14 Pupeteer 15) YPSKA #15 Curl 16) YPSKA #15 Taking a break 17) YPSKA #16 lit-html

Tenth day in a row, phew... Almost missed this one, but here it is.
If you are like me, scary thought maybe, and have fallen in love with TypeScript you might be feeling that the type checking would be nice to be present even at run time. Well, I got something for you, Runtypes. With this library you can define, AND check at run time, types and more (ranges for numbers, null/undefined etc). I've for example been using it to verify the JSON-data received from REST services.

You should probably use it with a bit of caution, so your project's performance won't be suffering. But giv it a try in some small and maybe critical part.

twitter logo DISCUSS
Classic DEV Post from Jun 14 '19

How do you organize your projects?

Where do you keep your side projects and portfolio?

Håkan Fahlstedt profile image
Senior fullstack developer that loves technology and sharing knowledge.