mirror of
https://github.com/denoland/deno.git
synced 2024-12-01 16:51:13 -05:00
21 lines
556 B
TypeScript
21 lines
556 B
TypeScript
|
// Copyright Node.js contributors. All rights reserved. MIT License.
|
||
|
import Transform from "./transform.ts";
|
||
|
import type { TransformOptions } from "./transform.ts";
|
||
|
import type { Encodings } from "../_utils.ts";
|
||
|
|
||
|
export default class PassThrough extends Transform {
|
||
|
constructor(options?: TransformOptions) {
|
||
|
super(options);
|
||
|
}
|
||
|
|
||
|
_transform(
|
||
|
// deno-lint-ignore no-explicit-any
|
||
|
chunk: any,
|
||
|
_encoding: Encodings,
|
||
|
// deno-lint-ignore no-explicit-any
|
||
|
cb: (error?: Error | null, data?: any) => void,
|
||
|
) {
|
||
|
cb(null, chunk);
|
||
|
}
|
||
|
}
|