shortened parameter names

This commit is contained in:
Arturas
2018-09-06 13:46:31 +01:00
parent 868cc68369
commit 55beab8d1d
2 changed files with 10 additions and 10 deletions

View File

@@ -5,19 +5,19 @@
/// <reference types="node" />
import * as through2 from 'through2';
import stream = require('stream');
import { TransformFunction, FlushCallback } from 'through2';
import { DuplexOptions, Transform as TransformStream } from 'stream';
declare function through2Concurrent(transform?: through2.TransformFunction, flush?: through2.FlushCallback): stream.Transform;
declare function through2Concurrent(opts?: through2Concurrent.Through2ConcurrentOptions, transform?: through2.TransformFunction, flush?: through2.FlushCallback): stream.Transform;
declare function through2Concurrent(transform?: TransformFunction, flush?: FlushCallback): TransformStream;
declare function through2Concurrent(opts?: through2Concurrent.Through2ConcurrentOptions, transform?: TransformFunction, flush?: FlushCallback): TransformStream;
declare namespace through2Concurrent {
interface Through2ConcurrentOptions extends stream.DuplexOptions {
interface Through2ConcurrentOptions extends DuplexOptions {
maxConcurrency?: number;
}
function obj(transform?: through2.TransformFunction, flush?: through2.FlushCallback): stream.Transform;
function obj(opts?: Through2ConcurrentOptions, transform?: through2.TransformFunction, flush?: through2.FlushCallback): stream.Transform;
function obj(transform?: TransformFunction, flush?: FlushCallback): TransformStream;
function obj(opts?: Through2ConcurrentOptions, transform?: TransformFunction, flush?: FlushCallback): TransformStream;
}
export = through2Concurrent;

View File

@@ -1,10 +1,10 @@
import * as through2 from 'through2-concurrent';
import stream = require('stream');
import { Transform } from 'stream';
let str: stream.Transform;
let str: Transform;
const transformFn = (err: any, data: any) => {};
function flushCb(this: stream.Transform, cb: () => void) {
function flushCb(this: Transform, cb: () => void) {
cb();
}
const opts = {