import type http from 'node:http'; import type { Plugin } from '../types'; import eventsHandler from './domain/events-handler'; import type { HttpServerAdapterFactory, NativeApp } from './domain/http-server/types'; import { RegistryOptions } from './domain/options-sanitiser'; export { RegistryOptions }; type RegistryStartResult = { app: TApp; server: http.Server; }; type RegistryCallback = (err: unknown, data?: T) => void; export interface RegistryType> { close(): Promise; close(callback: (err?: Error | string) => void): Promise; on: typeof eventsHandler.on; register(plugin: Plugin): Promise; register(plugin: Plugin, callback?: (...args: any[]) => void): Promise; start(): Promise>; start(callback: RegistryCallback>): Promise>; app: TApp; } export default function registry>(inputOptions: RegistryOptions): RegistryType;