Initial commit

This commit is contained in:
jiapengyu
2026-07-27 13:37:48 +08:00
commit ecba71e2a5
39123 changed files with 5989154 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
import extend = require('./extend');
import stream = require('stream');
declare namespace through {
interface ThroughConstructor extends stream.Transform {
new (opts?: stream.DuplexOptions): stream.Transform;
(opts?: stream.DuplexOptions): stream.Transform;
}
type TransformCallback = (err?: any, data?: any) => void;
type TransformFunction = (
this: stream.Transform,
chunk: any,
enc: string,
callback: TransformCallback
) => void;
type FlushCallback = (
this: stream.Transform,
flushCallback: () => void
) => void;
function obj(
transform?: TransformFunction,
flush?: FlushCallback
): stream.Transform;
function ctor(
transform?: TransformFunction,
flush?: FlushCallback
): ThroughConstructor;
function ctor(
opts?: stream.DuplexOptions,
transform?: TransformFunction,
flush?: FlushCallback
): ThroughConstructor;
}
declare function through(
transform?: through.TransformFunction,
flush?: through.FlushCallback
): stream.Transform;
declare function through(
opts?: stream.DuplexOptions,
transform?: through.TransformFunction,
flush?: through.FlushCallback
): stream.Transform;
export = through;