UNPKG

@qbraid-core/base

Version:

Core functionality for interacting with qBraid Cloud Services.

28 lines (27 loc) 978 B
export declare const DEFAULT_CONFIG: ConfigData; export declare const DEFAULT_CONFIG_V1: ConfigData; /** * Abstract base class for configuration management. * Provides core configuration logic without filesystem operations. * Implementations should provide their own storage mechanism. */ export declare abstract class ConfigManager<T> { protected configPath: string; protected config: T; constructor(filePath: string); protected abstract parseConfig(content: string): T; protected abstract stringifyConfig(config: T): string; protected abstract getDefaultConfig(): T; /** * Load configuration. Implementation depends on the storage mechanism. */ abstract loadConfig(): T; /** * Save configuration. Implementation depends on the storage mechanism. */ abstract saveConfig(): void; getConfig(): T; } type ConfigSection = Record<string, string>; export type ConfigData = Record<string, ConfigSection>; export {};