DefinitelyTyped/types/stream-throttle/index.d.ts
2018-08-28 18:17:11 -07:00

23 lines
603 B
TypeScript

// Type definitions for stream-throttle 0.1
// Project: https://github.com/tjgq/node-stream-throttle
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types = "node" />
import { Transform } from 'stream';
export interface ThrottleOptions {
readonly rate: number;
readonly chunksize?: number;
}
export class Throttle extends Transform {
constructor(options: ThrottleOptions);
}
export class ThrottleGroup {
constructor(options: ThrottleOptions);
throttle(options: ThrottleOptions): Throttle;
}