mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #4031 from czechboy0/master
On-finished 2.2.0 typings
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
/// <reference path="./on-finished.d.ts" />
|
||||
|
||||
import events = require('events');
|
||||
import onFinished = require('on-finished');
|
||||
|
||||
function test_finished() {
|
||||
|
||||
var e = new events.EventEmitter();
|
||||
|
||||
var ret: NodeJS.EventEmitter = onFinished(e, () => {
|
||||
//callback
|
||||
});
|
||||
|
||||
var finished: boolean = onFinished.isFinished(e);
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// Type definitions for on-finished v2.2.0
|
||||
// Project: https://github.com/jshttp/on-finished
|
||||
// Definitions by: Honza Dvorsky <http://github.com/czechboy0>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
|
||||
declare module 'on-finished' {
|
||||
|
||||
function onFinished(msg:NodeJS.EventEmitter, listener:Function): NodeJS.EventEmitter;
|
||||
|
||||
module onFinished {
|
||||
export function isFinished(msg:NodeJS.EventEmitter):boolean;
|
||||
}
|
||||
|
||||
export = onFinished;
|
||||
}
|
||||
Reference in New Issue
Block a user