DEV Community

Discussion on: Using Typescript without compilation

Collapse
 
syeo66 profile image
Red Ochsenbein (he/him)

The irony is: There is no Svelte project without compilation step.

Collapse
 
thepassle profile image
Pascal Schilp

Not everybody uses Svelte

Collapse
 
syeo66 profile image
Red Ochsenbein (he/him)

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.

Thread Thread
 
thepassle profile image
Pascal Schilp • Edited

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.

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
thepassle profile image
Pascal Schilp

This is exactly what makes me think you haven't read the article, the JSDoc equivalent is literally below it.

Thread Thread
 
syeo66 profile image
Red Ochsenbein (he/him)

Yes, sorry. Wrong example.

Thread Thread
 
isaachagoel profile image
Isaac Hagoel

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