From 55beab8d1d8dcedf4235d2ccba71bc7b9c16a9f8 Mon Sep 17 00:00:00 2001 From: Arturas Date: Thu, 6 Sep 2018 13:46:31 +0100 Subject: [PATCH] shortened parameter names --- types/through2-concurrent/index.d.ts | 14 +++++++------- .../through2-concurrent-tests.ts | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/types/through2-concurrent/index.d.ts b/types/through2-concurrent/index.d.ts index f43821a4fc..c4c0928b38 100644 --- a/types/through2-concurrent/index.d.ts +++ b/types/through2-concurrent/index.d.ts @@ -5,19 +5,19 @@ /// -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; diff --git a/types/through2-concurrent/through2-concurrent-tests.ts b/types/through2-concurrent/through2-concurrent-tests.ts index 9390d23694..f76c2b4d6d 100644 --- a/types/through2-concurrent/through2-concurrent-tests.ts +++ b/types/through2-concurrent/through2-concurrent-tests.ts @@ -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 = {