JSDoc gives you insane JavaScript intelephense. But it looks like a garbage to me. It's an comment. Why would you even insert types into an comment. Comments should not be part of programming language's intelephense.
That's why I love TypeScript so much! It's my favourite programming language. You get for free type-related bug checker and you can create your own types.
interface Save {
name: string[];
}
Want to create a type for your file's state? You're welcome.
type FileState = "open" | "closed" | "readonly";
I use TS everywhere I can. For example, using Nexe I can build console applications with it. Using TypeScript compiler I can create JavaScript for sites like this joke of a website. Using electron-builder I can make desktop, GUI applications.
Why I don't use C++? Well, I used to write most project in it, but now I found the TS magic. You can create union types
type Something = 'x' | 'y';
you can create object interfaces (first code snippet) and more.