UNPKG

dino-core

Version:

A dependency injection framework for NodeJS applications

45 lines (44 loc) 1.1 kB
import { type Provider } from 'nconf'; interface DinoConfiguration { dependencyTree?: { enabled: boolean; }; active?: { profiles: string[]; }; } export interface EnvironmentConfiguration extends Record<string, any> { dino: DinoConfiguration; } /** * @class * @public * @type EnvironmentConfiguration */ export declare class EnvironmentConfiguration { private readonly nconf; /** * * @param {nconf} nconf the nconf object * @constructor */ constructor(nconf: Provider); /** * Allow to retrieve a value for a particular key * @param {string} key the to retrieve * @returns the value associate with the provided key or undefined * * @public */ get(key: string): any; /** * Allows to retrieve a value or a provided default value * @param {string} key the key to retrieve * @param {any} def the default value * @returns The value associated with the provided key of the default value * * @public */ getOrDefault(key: string, def: any): any; } export {};