diff --git a/src/runtime/node/http/response.ts b/src/runtime/node/http/response.ts index f61bea5b..cd111a6c 100644 --- a/src/runtime/node/http/response.ts +++ b/src/runtime/node/http/response.ts @@ -79,8 +79,9 @@ export class ServerResponse extends Writable implements http.ServerResponse { return this } - setHeader (name: string, value: number | string | ReadonlyArray): void { + setHeader (name: string, value: number | string | ReadonlyArray): this { this._headers[name.toLowerCase()] = value + '' + return this } getHeader (name: string): number | string | string[] | undefined { diff --git a/src/runtime/node/stream/writable.ts b/src/runtime/node/stream/writable.ts index 46516705..deaca3f8 100644 --- a/src/runtime/node/stream/writable.ts +++ b/src/runtime/node/stream/writable.ts @@ -66,6 +66,8 @@ export class Writable extends EventEmitter implements stream.Writable { this.writableFinished = true this.emit('close') this.emit('finish') + // TODO: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/57473 + return this as unknown as void } cork (): void { @@ -78,5 +80,7 @@ export class Writable extends EventEmitter implements stream.Writable { this.destroyed = true delete this._data this.removeAllListeners() + // TODO: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/57473 + return this as unknown as void } }