diff options
Diffstat (limited to 'ext/http/00_serve.ts')
-rw-r--r-- | ext/http/00_serve.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/http/00_serve.ts b/ext/http/00_serve.ts index b12a87390..de94779dc 100644 --- a/ext/http/00_serve.ts +++ b/ext/http/00_serve.ts @@ -793,9 +793,9 @@ internals.serveHttpOnConnection = serveHttpOnConnection; function registerDeclarativeServer(exports) { if (ObjectHasOwn(exports, "fetch")) { - if (typeof exports.fetch !== "function" || exports.fetch.length !== 1) { + if (typeof exports.fetch !== "function") { throw new TypeError( - "Invalid type for fetch: must be a function with a single parameter", + "Invalid type for fetch: must be a function with a single or no parameter", ); } return ({ servePort, serveHost }) => { |