Sure, but, take a look at the very first sentence in your article... There's some irony in there. I get how and why this 'compilation-less' stuff works and especially makes sense for library developers. I for one would not want to have to maintain (at least) 2 files plus additional (possibly wrong) comments for every single module. But as you said, it's a question of preference.
You don't have to. You can write JSDoc types in your source code directly as well, if you don't want to use .d.ts files for some reason. Also the comments are not "possibly" wrong, because tsc will still warn you about this.
Rich Harris said that a compilation/transpilation step is more or less mandatory for Apps anyway (optimizing, bundling etc) but the same is not true for libraries
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Not everybody uses Svelte
Sure, but, take a look at the very first sentence in your article... There's some irony in there. I get how and why this 'compilation-less' stuff works and especially makes sense for library developers. I for one would not want to have to maintain (at least) 2 files plus additional (possibly wrong) comments for every single module. But as you said, it's a question of preference.
You don't have to. You can write JSDoc types in your source code directly as well, if you don't want to use
.d.tsfiles for some reason. Also the comments are not "possibly" wrong, becausetscwill still warn you about this.This is exactly what makes me think you haven't read the article, the JSDoc equivalent is literally below it.
Yes, sorry. Wrong example.
Rich Harris said that a compilation/transpilation step is more or less mandatory for Apps anyway (optimizing, bundling etc) but the same is not true for libraries