mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge pull request #10298 from korve/master
extends node-webkit App and Window classes with EventEmitter as they can emit events
This commit is contained in:
Vendored
+2
-2
@@ -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;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/// <reference path="trayballoon.d.ts" />
|
||||
|
||||
import trayballoon = require( "trayballoon" );
|
||||
|
||||
function testTrayballoon() {
|
||||
trayballoon( {
|
||||
text: "text",
|
||||
title: "title",
|
||||
icon: "icon",
|
||||
timeout: 5000,
|
||||
wait: true
|
||||
}, () => {
|
||||
|
||||
} );
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for trayballoon
|
||||
// Project: https://github.com/sindresorhus/trayballoon
|
||||
// Definitions by: André Eckardt <https://github.com/korve>
|
||||
// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user