UNPKG

@nova-ts/core

Version:

A serverside framework used to build scalable application

26 lines (24 loc) 894 B
/** * Responsible for loading application configuration from YAML (.yml) * or other property sources during app startup. */ declare class ConfigLoader { private static config; /** * Loads the configuration file (default: `application.yml`) from the specified directory * and caches it statically. * * @param directory - Optional directory path where the config file is located. * Defaults to current working directory. * @throws Will throw an error if no config file is found. */ static load(directory?: string): void; /** * Gets a nested value from the config using dot notation (e.g., "server.port"). * * @param path - Dot-notated path to a specific configuration key. * @returns The resolved value or `undefined` if not found. */ static get<T = any>(key: string, defaultValue?: T): T; } export { ConfigLoader };