Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developing atom packages in typescript

I was wondering if anybody has done this successfully? I couldn't find any support for this.

Some references to documentation or existing code would be appreciated.

I'm aware that atom runs on node and that nodes has a typescript compiler package.

I'm specifically wondering if there were typescript definition files for the modules required to build atom packages.

like image 937
qwertyzw Avatar asked Oct 16 '16 00:10

qwertyzw


People also ask

Can Atom run scripts?

Run DevWeb scripts from Atom.ioYou can run your DevWeb script for up to 50 Vusers, using the DevWeb plugin for Atom.io.

Is Atom A good IDE for JavaScript?

Atom is developed by GitHub and is an excellent IDE for JavaScript programming. It is a free and open-source desktop program based on web technology. You can add tools, themes, and features with the built-in package manager.


1 Answers

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.

like image 140
Paarth Avatar answered Sep 30 '22 11:09

Paarth