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( export async function listenAndServe(
addr: string, addr: string | ServerConfig,
handler: (req: ServerRequest) => void handler: (req: ServerRequest) => void
): Promise<void> { ): Promise<void> {
const server = serve(addr); const server = serve(addr);