import http from 'node:http'; import { Application } from 'express'; interface Cardinal { app: Application | null; server: http.Server | null; teardownHandlers: Array<() => Promise>; isShuttingDown: boolean; } declare const cardinal: Cardinal; declare function teardown(handler: () => Promise): void; declare function shutdown(): Promise; type MiddlewareSetup = (app: Application) => void | Promise; declare function setup(middleware?: MiddlewareSetup): Promise; declare function create(middleware?: MiddlewareSetup): { app: Application; server: http.Server; shutdown: typeof shutdown; }; export { type MiddlewareSetup, cardinal, create, setup, shutdown, teardown };