UNPKG

@piggly/fastify-chassis

Version:

An ESM/CommonJS toolkit to help you to do common operations in your back-end applications with Fastify and NodeJS.

19 lines (18 loc) 744 B
import type { RawServerBase } from 'fastify'; import type { HttpServerInterface, DefaultEnvironment } from '../types'; /** * Cleanup dependencies. * It will run the CleanUpService to clean all registered dependencies. * * It will wait for: * - EventBus cleanup; * - LoggerService flush and cleanup. * * You may not need to cleanup classes above when using this. * * @param {HttpServerInterface<Server, AppEnvironment> | undefined} server * @returns {Promise<number>} * @since 5.5.0 * @author Caique Araujo <caique@piggly.com.br> */ export declare const cleanupDependencies: <Server extends RawServerBase, AppEnvironment extends DefaultEnvironment>(server?: HttpServerInterface<Server, AppEnvironment>) => (() => Promise<number>);