1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-08 15:19:40 -05:00

fix(std/http): update listenAndServe argument type (#3775)

allow same argument type for `listenAndServe` as `serve`.
fixes: #3774
This commit is contained in:
Carl Rosell 2020-01-24 16:35:23 +01:00 committed by Ryan Dahl
parent bc89f04cbf
commit 11a29fdb44

View file

@ -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);