-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.d.ts
28 lines (23 loc) · 845 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Server } from 'net'
import { Express, NextFunction, Request, RequestHandler, Response } from 'express'
declare namespace GracefulExit {
interface Configuration {
errorDuringExit?: boolean
performLastRequest?: boolean
callback?: (code: number) => void
log?: boolean
logger?: (message: string) => void
getRejectionError?: () => Error
suicideTimeout?: number
exitProcess?: boolean
exitDelay?: number
force?: boolean
}
function init(server: Server): void
function gracefulExitHandler(app: Express, server: Server, options?: Configuration): void
function middleware(app: Express): RequestHandler
function disconnectSocketIOClients(): void
function hardExitHandler(): void
function handleFinalRequests(req: Request, res: Response, next: NextFunction): void
}
export = GracefulExit