The developer of Svelte moved from Typescript to JSDoc and explained in depth in an interview (you can find it on youtube). ECMA (the dudes making Javascript/ECMAscript) also started noticing that maybe static typing would be useful and there's a proposal to add typing to it. Whether that's moving forward or not, no idea, but if it were to come to vanillaJS, it's imaginable that typescript would be much less useful than it is now.
Programming
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
I'm not a FE guy so don't write it much, but I'd always rather use typescript if I had to use anything like JS. Our FE guys use typescript at my current job and my previous one as well
JavaScript will implement the things that work out in TypeScript. So… yes and no?
Personally I'd rather use JSDoc in my own projects for type annotations and call it a day. I find TS a bit annoying but that might be because I'm not that familiar with it.
That's just Typescript with extra steps.
Though I have also done this once or twice for single-file projects where I didn't want to deal with actually running tsc
. It has some annoying downsides though, e.g. you don't get to have a tsconfig.json
and the syntax sucks.
Microsoft had a proposal to allow TS annotations in JavaScript which would have been awesome and fixed the syntax issue.
Looks like it was discussed a year ago and hasn't really made much progress. Seems like lots of people wanting to shoehorn runtime type checking onto it.
Is it? I just have it auto-generate in my IDE with snippets. If I was using TS I would still document using TSDoc anyway. You can use jsconfig.json
instead.
TypeScript is the new DOC format.
Create a language/format. Spend all of your effort making it ubiquitous until it becomes the default "standard" in the workplace. Then charge a metric fuck-tonne for the "official" software that makes use of it.
It's how Office became their cash cow. They create the proprietary doc format, get everyone using it, and once it's embedded in the workplace, charge exorbitantly for the software that uses it.
Once they get everyone using TS as a new industry standard, they'll find a way to make people have to pay for it. Mark my words.
I honestly think this is fearmongering. Yes, Microsoft is a shitty company that has done shitty things, but:
- the Typescript repo is licensed with Apache 2.0, which means the community can always fork it if they do bad/evil stuff
- there are competing type checkers in the works, which would fully remove any Microsoft influence from a developer using Typescript
- there already are competing compilers which are broadly used
The only real option they have to do what you're describing is to implement new features that could be used for monetizing it - there would be some inertia regarding community forks. But even then I can't come up with any monetization model that could make sense. Do you have a specific example in mind?
The only valid argument against typescript is that it is too similar to vanilla JavaScript. It does not go far enough. We need type systems like Ocaml's.
I suppose you can also complain about needing a build step, but I find this silly. There are so many tools that make this easy or automatic.
If JavaScript implements type safety then I believe it will go away. If not then it will continue to be used.
I don’t think your manager is sane.
Why on earth would we move back to JavaScript at this point.
Disclosure: I am a TypeScript dev and my boss is fully invested in Microsoft at this point. We use C# .Net and we use Azure and Teams.
He might've watched this video: https://youtu.be/5ChkQKUzDCs
TL;DR: Big projects, like Svelte, Drizzle and Turbo ditched TypeScript