mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
Add _destroy to for node Readable stream (#20068)
From the docs: https://nodejs.org/api/stream.html#stream_readable_destroy_err_callback As specified in https://nodejs.org/api/stream.html#stream_readable_destroy_error implementors are recommended to implement this method instead of `destroy()` and the original method should be available for calling via `super`. This change matches the signatures of other Stream subclasses by annotating `callback` as `Function` instead of `(err: Error) => void`.
This commit is contained in:
1
types/node/index.d.ts
vendored
1
types/node/index.d.ts
vendored
@@ -5073,6 +5073,7 @@ declare module "stream" {
|
||||
unshift(chunk: any): void;
|
||||
wrap(oldStream: NodeJS.ReadableStream): Readable;
|
||||
push(chunk: any, encoding?: string): boolean;
|
||||
_destroy(err: Error, callback: Function): void;
|
||||
destroy(error?: Error): void;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user