2023-07-27 05:31:52 +00:00
|
|
|
/*
|
2024-02-13 15:59:27 +00:00
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 05:31:52 +00:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-07-19 02:27:50 +00:00
|
|
|
import { Writable, WritableOptions } from 'node:stream';
|
2023-01-24 06:54:14 +00:00
|
|
|
|
|
|
|
export class DevNull extends Writable implements NodeJS.WritableStream {
|
2023-07-19 02:27:50 +00:00
|
|
|
constructor(opts?: WritableOptions) {
|
|
|
|
super(opts);
|
|
|
|
}
|
2023-01-24 06:54:14 +00:00
|
|
|
|
2023-07-19 02:27:50 +00:00
|
|
|
_write (chunk: any, encoding: BufferEncoding, cb: (err?: Error | null) => void) {
|
|
|
|
setImmediate(cb);
|
|
|
|
}
|
2023-01-24 06:54:14 +00:00
|
|
|
}
|