Skip to content

Commit 39aacaa

Browse files
committed
Solve a compile error that should be a non-issue
We are going to return `this` in the function changed which shouldn't have any side effects since we wouldn't have been doing anything with void anyway.
1 parent 6669c37 commit 39aacaa

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/chunktransformer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,14 @@ export class ChunkTransformer extends Transform {
166166
* @public
167167
* @param {error} err error if any
168168
*/
169-
destroy(err?: Error): void {
170-
if (this._destroyed) return;
169+
destroy(err?: Error): this {
170+
if (this._destroyed) return this;
171171
this._destroyed = true;
172172
if (err) {
173173
this.emit('error', err);
174174
}
175175
this.emit('close');
176+
return this
176177
}
177178

178179
/**

0 commit comments

Comments
 (0)