I don’t think it really fractures anything considering you can call a ts package from js without knowing. The other way also works with third party typings in DefinitelyTyped.
It really just adds a bit of extra type info into js, looks like js, and transpiles into js that looks almost exactly like the input, including comments and spacing and such if you like, so there isn’t any lockin.
There isn’t any competition, it’s just an extra optional tool for the js ecosystem in my eyes.
JakenVeina@lemm.ee 1 year ago
The fact that TypeScript doesn’t attempt to obfuscate JavaScript, and just fills in the gaps, is what makes it the best solution to the problem.
It’s not a separate language, it’s Javascript tooling
fidodo@lemm.ee 1 year ago
I’ve used JavaScript since its creation. I would describe typescript as JavaScript as it should have been. I’ve always actually liked JavaScript’s simplicity, but I’ve never liked its lack of type safety. At its core, JavaScript has a tiny conceptual footprint, and that’s actually pretty refreshing compared to other very complicated languages. But it was plagued with terrible implementations and the inherent messiness of dynamic typing. I’ve watched it evolve over the years and it’s improved beyond my greatest hopes. Between the advent of transpilation, tooling, and typescript, I’m very proud of where the language has gotten to. Having made websites in the 90s and 00s, I feel like people don’t realize how much work has gone into getting the ecosystem in a much better place.