import * as http from 'http'; /** * An HTTP server extended with utility methods. * * @public */ export interface ExtendedHttpServer extends http.Server { start(): Promise; stop(): Promise; port(): number; } /** * Options for starting up an HTTP server. * * @public */ export type HttpServerOptions = { listen: { port: number; host: string; }; https?: { certificate: HttpServerCertificateOptions; }; }; /** * Options for configuring HTTPS for an HTTP server. * * @public */ export type HttpServerCertificateOptions = { type: 'pem'; key: string; cert: string; } | { type: 'generated'; hostname: string; };