|
|
|
|
|
by eyelidlessness
1137 days ago
|
|
We already have that! And it’s TypeScript. You can and probably do use 98% (made up number but close enough to reality I don’t need to quantify it) of the benefits of TS while authoring JS code if you bother annotating types in JSDoc. You can also get the same type checking benefits outside of the editor (eg in CI) with very minimal tooling effort. That’s what Svelte is doing. Granted I work on JS projects which embraced this from the opposite direction (gradual typing where nothing is enforced statically), and it’s strictly worse than just using the tools how they work best (you’d be hard pressed to make an incremental decision about anything without knowingly preserving bugs or increasing the incremental scope). Anyway, the alternate timeline you seek already exists. It’s just so optional that you could easily miss it. |
|