Alex Grönholm Alex Grönholm - 1 month ago 18
TypeScript Question

How do I install typescript definitions for Electron?

I have two problems:


  • Which definitions should I install?
    typings search electron
    returns quite a few results.

  • How do I install them?
    typings install dt~github-electron --global --save
    gives me an error:


    Attempted to compile "github-electron" as an external module, but it
    looks like a global module. You'll need to enable the global option to
    continue.


Answer

The source needs to be set to dt and it seems to work just fine.

$ typings install github-electron --source dt --global