import type { IConfig } from './config.interface'; /** * Interface for managing application configuration. * Defines contract for reading, writing, and manipulating configuration settings. */ export interface IConfigService { /** * Checks if the configuration exists. * @returns Promise resolving to true if the configuration exists, false otherwise */ exists(): Promise; /** * Retrieves the current configuration. * @returns Promise resolving to the configuration object */ get(): Promise; /** * Gets a specific property from the configuration. * @param property - The property key to retrieve * @returns Promise resolving to the value of the specified property */ getProperty(property: K): Promise; /** * Merges partial configuration with the existing configuration. * @param partial - Partial configuration to merge * @returns Promise that resolves when the merged configuration is saved */ merge(partial: Partial): Promise; /** * Saves the entire configuration. * @param config - The complete configuration to save * @returns Promise that resolves when the configuration is saved */ set(config: IConfig): Promise; /** * Sets a specific property in the configuration. * @param property - The property key to set * @param value - The value to assign to the property * @returns Promise that resolves when the updated configuration is saved */ setProperty(property: K, value: IConfig[K]): Promise; }