diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 119db3292..8df21aa14 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/protos.js b/protos/protos.js index be9873c73..d1e728211 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/partial-result-stream.ts b/src/partial-result-stream.ts index bf8d96e25..786913d56 100644 --- a/src/partial-result-stream.ts +++ b/src/partial-result-stream.ts @@ -157,9 +157,9 @@ export class PartialResultStream extends Transform implements ResultEvents { * * @param {Error} [err] Optional error to destroy stream with. */ - destroy(err?: Error): void { + destroy(err?: Error): this { if (this._destroyed) { - return; + return this; } this._destroyed = true; @@ -170,6 +170,7 @@ export class PartialResultStream extends Transform implements ResultEvents { } this.emit('close'); }); + return this; } /** * Processes each chunk.