Developing atom packages in typescript Developing atom packages in typescript typescript typescript

Developing atom packages in typescript


Ultimately typescript will compile to Javascript so anything that can be written in JS can be written in TS, atom packages included.

As far as typings go, DefinitelyTyped is the most common repository for such files. I believe this is the typing you're looking for:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/atom/atom.d.ts

You can save and include that manually if you like but the recommended approach is to use a typings manager like Typings or TSD (deprecated). TSD is deprecated in favor of typings, but has a simpler interface so I wouldn't call it evil to use it as a learning experience.

In case you're interested in a real world example, it looks like the atom-typescript plugin is written in typescript (at least partially), though that may be too big to be easily understood.