add missing listen type (#1154)

This commit is contained in:
Peyman
2026-03-07 14:37:46 +03:30
committed by GitHub
parent 0e628dbf66
commit 034b67a2af

2
docs/index.d.ts vendored
View File

@@ -287,6 +287,8 @@ export enum ListenOptions {
export interface TemplatedApp {
/** Listens to hostname & port. Callback hands either false or a listen socket. */
listen(host: RecognizedString, port: number, cb: (listenSocket: us_listen_socket | false) => void | Promise<void>) : TemplatedApp;
/** Listens to hostname & port and sets Listen Options. Callback hands either false or a listen socket. */
listen(host: RecognizedString, port: number, options: ListenOptions, cb: (listenSocket: us_listen_socket | false) => void | Promise<void>) : TemplatedApp;
/** Listens to port. Callback hands either false or a listen socket. */
listen(port: number, cb: (listenSocket: us_listen_socket | false) => void | Promise<void>) : TemplatedApp;
/** Listens to port and sets Listen Options. Callback hands either false or a listen socket. */