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.

60 lines (59 loc) 1.59 kB
import { DefaultEnvironment } from '../types'; /** * @file The environment settings service. * @since 5.0.0 */ export declare class EnvironmentService<Settings extends DefaultEnvironment = DefaultEnvironment> { /** * The settings. * * @protected * @memberof EnvironmentService * @since 5.0.0 * @author Caique Araujo <caique@piggly.com.br> */ protected _settings: Settings; /** * Create a new environment settings service. * * @param settings The settings. * @public * @constructor * @memberof EnvironmentService * @since 5.0.0 * @author Caique Araujo <caique@piggly.com.br> */ constructor(settings: Settings); /** * Get the settings. * * @public * @memberof EnvironmentService * @since 5.0.0 * @author Caique Araujo <caique@piggly.com.br> */ get settings(): Settings; /** * Register application service. * * @param {LoggerService} service * @public * @static * @memberof LoggerService * @since 5.0.0 * @author Caique Araujo <caique@piggly.com.br> */ static register(service: EnvironmentService<any>): void; /** * Resolve application service. * * @returns {LoggerService} * @throws {Error} If service is not registered. * @public * @static * @memberof LoggerService * @since 5.0.0 * @author Caique Araujo <caique@piggly.com.br> */ static resolve<Settings extends DefaultEnvironment = DefaultEnvironment>(): EnvironmentService<Settings>; }