I am trying to use TypeScript in an existing NW.js + JS project.
Since I am new to NW.js, I naively assumed it works out of the box after installing the nw.gui typings.
It doesn't (as TypeScript does not recognize the global
import * as nw from 'nw.gui';
Cannot find module 'nw.gui'
Workaround which lets me use the global nw variable from NW.js:
declare var nw: any;
The compiler doesn't complain anymore. I don't get any type information, but I can live with that and just use it as I would in JS.