In TypeScript, you have no way to specify what a function throws. With JSTalk, you can define an at-throws. This is so much better than having to type guard every single time in unknown error. It's even just with I'm doing demos in the browser and you can import ES modules straight from a URL. You can you can use import and export. The fact that that works straight away in the browser without needing any sort of compile step is it's pretty amazing.
In this episode of Syntax, Wes and Scott use the fact that Svelte is being converted from TypeScript to JavaScript with JSDoc to talk about the benefits of working that way, why they are doing it, and what you can do with JSDoc that TypeScript alone doesn’t let you do.
Show Notes
××× SIIIIICK ××× PIIIICKS ×××
Shameless Plugs
Tweet us your tasty treats