Merge pull request #3108 from nikeee/master

Fix bug in node-webkit when requiring nw.gui
This commit is contained in:
Masahiro Wakame
2014-11-09 00:28:10 +09:00
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -1,7 +1,9 @@
///<reference path="../node/node.d.ts"/>
///<reference path="node-webkit.d.ts"/>
// Load native UI library
var gui: typeof nw.gui;
// See docs: https://github.com/rogerwang/node-webkit/wiki/Shell
import gui = require("nw.gui");
/* WINDOW */
@@ -109,7 +111,7 @@ var gui: typeof nw.gui;
/* MENU ITEM */
var itemc:nw.gui.MenuItem;
var itemc:gui.MenuItem;
// Create a separator
itemc = new gui.MenuItem({ type: 'separator' });
+1 -1
View File
@@ -3,7 +3,7 @@
// Definitions by: Pedro Casaubon <https://github.com/xperiments>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module nw.gui {
declare module "nw.gui" {
interface IEventEmitter {
addListener(event: string, listener: Function): EventEmitter;