Working with TypeScript definitions( d.ts ) on .js files?


#1

I’m a WebStorm user and trying to find similar features I use in Atom. Webstorm had a feature where you could search for type definitions hosted on DefinitelyTyped, download the d.ts files somewhere and provide a better autocomplete experience for the package the definitions were for. This worked for regular .js files, I didn’t need to write .ts ones or do any compilation. I understand regular js works fine in typescript, so a .js file might just be treated as a .ts file to provide the improved autocomplete suggestions?

How would I go about using d.ts files to improve autocomplete for .js files in Atom? And is there a similar method of searching/downloading the d.ts files somewhere for Atom to use or do I need to manually get the d.ts files and place them somewhere myself?

I’m aware of the following packages:
atom-typescript, fully featured package for everything typescript?
typescript-atomizer, I’m assuming this is similar but perhaps less featured and I should stick with atom-typescript?
atom-tsd, seems to be a way to search/download definitions but requires me to perform an npm install for TSD? Would have thought the package could run the npm install command for this? Do I need to install Node.js locally to do this and do I need another package to get the d.ts autocomplete support for .js files?


#2

I fully agree with polarathene, I don’t know about webstorm but in vscode this feature works very well out of the box, gives intellisense-like features in .js files using d.ts typings. That is one of the best features I like about vscode and I would really like to see this in atom as well.


#3

I second this.

Everything about atom is truly amazing except this one piece of the puzzle.
Which happens to be IMO the most important aspect of an editor/ide.
Without the ability to have intellisense like features, it has a very negative impact on the developer.