mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-17 07:20:23 +00:00
Merge pull request #3108 from nikeee/master
Fix bug in node-webkit when requiring nw.gui
This commit is contained in:
@@ -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' });
|
||||
|
||||
Vendored
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user