Add declaration for freeport

This commit is contained in:
Arne Schubert
2016-04-03 14:44:05 +02:00
parent d969b903d1
commit 39264141f7
2 changed files with 19 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
/// <reference path="freeport.d.ts" />
import freeport = require('freeport');
var num: number;
freeport((err, made) => {
num = made;
});
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for freeport 1.0.5
// Project: https://github.com/daaku/nodejs-freeport
// Definitions by: Arne Schubert <https://github.com/atd-schubert>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'freeport' {
function freeport(cb: (err: Error, port: number) => void): void;
export = freeport;
}