UNPKG

http-shutdown

Version:

Gracefully shutdown a running HTTP server.

13 lines (8 loc) 293 B
// Missing type definitions import { Server } from 'net'; export = wrapShutdown; interface WithShutdown extends Server { shutdown(cb: (err?: Error) => any): void; forceShutdown(cb: (err?: Error) => any): void; } declare function wrapShutdown<S extends Server>(s: S): S & WithShutdown;