UNPKG

open-collaboration-server

Version:

Open Collaboration Server implementation, part of the Open Collaboration Tools project

33 lines 1.51 kB
export interface Configuration { /** * Get a string value for the given configuration key. * The key must be provided in kebab-case. */ getValue(key: string, type?: 'string'): string | undefined; /** * Get a number value for the given configuration key. * The key must be provided in kebab-case. */ getValue(key: string, type: 'number'): number | undefined; /** * Get a boolean value for the given configuration key. * The key must be provided in kebab-case. */ getValue(key: string, type: 'boolean'): boolean | undefined; } export declare const Configuration: unique symbol; export declare const ConfigurationFile: unique symbol; export type ConfigurationValue = string | number | boolean; export declare class DefaultConfiguration implements Configuration { protected configurationFile: string | undefined; protected configuration: Record<string, unknown>; protected initialize(): void; getValue(key: string, type?: 'string'): string | undefined; getValue(key: string, type: 'number'): number | undefined; getValue(key: string, type: 'boolean'): boolean | undefined; protected convertToType(value: ConfigurationValue | undefined, type?: 'string' | 'number' | 'boolean'): ConfigurationValue | undefined; protected getFromEnv(key: string): string | undefined; protected getFromConfig(key: string): ConfigurationValue | undefined; private getFromConfigObject; } //# sourceMappingURL=configuration.d.ts.map