mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
fix(std/http): update listenAndServe argument type (#3775)
allow same argument type for `listenAndServe` as `serve`. fixes: #3774
This commit is contained in:
parent
bc89f04cbf
commit
11a29fdb44
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue