diff options
author | Carl Rosell <me@carlrosell.com> | 2020-01-24 16:35:23 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2020-01-24 10:35:23 -0500 |
commit | 11a29fdb44f5c07f4bc7aa49a136b695ee17f0c3 (patch) | |
tree | d9292fc47c560a2b547766907c39fcd3a2376844 | |
parent | bc89f04cbf5e7a8480331eea77e57a100c8179d7 (diff) |
fix(std/http): update listenAndServe argument type (#3775)
allow same argument type for `listenAndServe` as `serve`.
fixes: #3774
-rw-r--r-- | std/http/server.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/http/server.ts b/std/http/server.ts index 9884cd845..bd66e9f90 100644 --- a/std/http/server.ts +++ b/std/http/server.ts @@ -494,7 +494,7 @@ export function serve(addr: string | ServerConfig): Server { } export async function listenAndServe( - addr: string, + addr: string | ServerConfig, handler: (req: ServerRequest) => void ): Promise<void> { const server = serve(addr); |