Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Sep 22, 2024
1 parent b9cd97c commit 806ef67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/handler/decorator-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ module.exports = class DecoratorHandler {

// New API

onRequestStart (reserved, abort) {
onRequestStart (abort) {
if (this.#handler.onRequestStart) {
this.#handler.onRequestStart(reserved, abort)
this.#handler.onRequestStart(abort)
}

if (this.#handler.onConnect) {
Expand Down Expand Up @@ -102,7 +102,7 @@ module.exports = class DecoratorHandler {

onConnect (...args) {
if (this.#handler.onRequestStart) {
this.#handler.onRequestStart(null, args[0])
this.#handler.onRequestStart(args[0])
}

if (this.#handler.onConnect) {
Expand Down
2 changes: 1 addition & 1 deletion types/dispatcher.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ declare namespace Dispatcher {
}
export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable
export interface DispatchHandlers {
onRequestStart?(reserved: null, abort: (err?: Error) => void): void;
onRequestStart?(abort: (err?: Error) => void): void;
onResponseStart?(resume: () => void): boolean;
onResponseHeaders?(headers: Record<string, string>, statusCode: number): boolean;
onResponseData?(chunk: Buffer): boolean;
Expand Down

0 comments on commit 806ef67

Please sign in to comment.