mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
Merge pull request #3635 from rogierschouten/event-loop-lag
Add typings for module event-loop-lag
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
Vendored
+14
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user