diff --git a/node-webkit/node-webkit.d.ts b/node-webkit/node-webkit.d.ts index 81129274dc..3a9533875b 100644 --- a/node-webkit/node-webkit.d.ts +++ b/node-webkit/node-webkit.d.ts @@ -156,7 +156,7 @@ declare module "nw.gui" { eval(frame: HTMLIFrameElement, script: string): void; } - export interface App { + export interface App extends EventEmitter { argv: any; fullArgv: any; dataPath: string; @@ -199,7 +199,7 @@ declare module "nw.gui" { menu?: Menu; } - export class Tray implements TrayOption { + export class Tray extends EventEmitter implements TrayOption { constructor(option: TrayOption); title: string; tooltip: string; diff --git a/trayballoon/trayballoon-tests.ts b/trayballoon/trayballoon-tests.ts new file mode 100644 index 0000000000..dab23777e0 --- /dev/null +++ b/trayballoon/trayballoon-tests.ts @@ -0,0 +1,15 @@ +/// + +import trayballoon = require( "trayballoon" ); + +function testTrayballoon() { + trayballoon( { + text: "text", + title: "title", + icon: "icon", + timeout: 5000, + wait: true + }, () => { + + } ); +} diff --git a/trayballoon/trayballoon.d.ts b/trayballoon/trayballoon.d.ts new file mode 100644 index 0000000000..c60ffed40b --- /dev/null +++ b/trayballoon/trayballoon.d.ts @@ -0,0 +1,17 @@ +// Type definitions for trayballoon +// Project: https://github.com/sindresorhus/trayballoon +// Definitions by: André Eckardt +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare interface TrayballoonOptions { + text:string + title?:string + icon?:string + timeout?:number + wait?:boolean +} + +declare function trayballoonFn( opts:TrayballoonOptions, fn:Function ): void; +declare module "trayballoon" { + export = trayballoonFn; +} \ No newline at end of file