gcal-commander
Version:
A command-line interface for Google Calendar operations
29 lines (28 loc) • 967 B
TypeScript
import { IConfigStorage } from '../interfaces/config-storage';
import { Config, IConfigService } from '../interfaces/services';
export declare class ConfigService implements IConfigService {
private readonly configStorage;
private static readonly VALID_KEYS;
private config;
private loaded;
constructor(configStorage: IConfigStorage);
get<T>(key: string): Promise<T | undefined>;
getConfigPath(): string;
getValidKeys(): readonly string[];
list(): Promise<Config>;
load(): Promise<void>;
reset(): Promise<void>;
save(): Promise<void>;
set(key: string, value: unknown): Promise<void>;
unset(key: string): Promise<void>;
validateKey(key: string): boolean;
validateValue(key: string, value: unknown): {
error?: string;
errorKey?: string;
errorOptions?: unknown;
valid: boolean;
};
private deleteNestedValue;
private getNestedValue;
private setNestedValue;
}