Merge pull request #3635 from rogierschouten/event-loop-lag

Add typings for module event-loop-lag
This commit is contained in:
Horiuchi_H
2015-02-13 17:35:57 +09:00
3 changed files with 21 additions and 0 deletions
+1
View File
@@ -175,6 +175,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](es6-promise/es6-promise.d.ts) [es6-promise](https://github.com/jakearchibald/ES6-Promise) by [François de Campredon](https://github.com/fdecampredon), [vvakame](https://github.com/vvakame)
* [:link:](esprima/esprima.d.ts) [Esprima](http://esprima.org) by [teppeis](https://github.com/teppeis)
* [:link:](eventemitter2/eventemitter2.d.ts) [EventEmitter2](https://github.com/asyncly/EventEmitter2) by [ryiwamoto](https://github.com/ryiwamoto)
* [:link:](event-loop-lag/event-loop-lag.d.ts) [event-loop-lag](https://github.com/pebble/event-loop-lag) by [rogierschouten](https://github.com/rogierschouten)
* [:link:](exit/exit.d.ts) [exit](https://github.com/cowboy/node-exit) by [Bart van der Schoor](https://github.com/Bartvds)
* [:link:](expect.js/expect.js.d.ts) [expect.js](https://github.com/LearnBoost/expect.js) by [Teppei Sato](https://github.com/teppeis)
* [:link:](expectations/expectations.d.ts) [expectations.js](https://github.com/spmason/expectations) by [vvakame](https://github.com/vvakame)
+6
View File
@@ -0,0 +1,6 @@
/// <reference path="event-loop-lag.d.ts" />
import lag = require("event-loop-lag");
var fn: () => number = lag(1000);
var n: number = fn();
+14
View File
@@ -0,0 +1,14 @@
// Type definitions for event-loop-lag 1.0.3
// Project: https://github.com/pebble/event-loop-lag
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "event-loop-lag" {
/**
* Accepts a number of milliseconds representing how often to refresh the event loop lag measurement and returns a function you can call to receive the latest lag measurement in milliseconds.
*/
function lag(interval: number): () => number;
export = lag;
}