summaryrefslogtreecommitdiff
path: root/std/node/_stream/passthrough.ts
blob: 9126420e53084c3da0753a9581ba53e2370fe6e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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);
  }
}