@git.zone/tsdoc
Version:
A comprehensive TypeScript documentation tool that leverages AI to generate and enhance project documentation, including dynamic README creation, API docs via TypeDoc, and smart commit message generation.
59 lines (58 loc) • 1.58 kB
TypeScript
import type { IContextConfig, ITrimConfig, ITaskConfig, TaskType } from './types.js';
/**
* Manages configuration for context building
*/
export declare class ConfigManager {
private static instance;
private config;
private projectDir;
/**
* Get the singleton instance of ConfigManager
*/
static getInstance(): ConfigManager;
/**
* Private constructor for singleton pattern
*/
private constructor();
/**
* Initialize the config manager with a project directory
* @param projectDir The project directory
*/
initialize(projectDir: string): Promise<void>;
/**
* Get the default configuration
*/
private getDefaultConfig;
/**
* Load configuration from npmextra.json
*/
private loadConfig;
/**
* Merge configurations, with userConfig taking precedence
* @param defaultConfig The default configuration
* @param userConfig The user configuration
*/
private mergeConfigs;
/**
* Get the complete configuration
*/
getConfig(): IContextConfig;
/**
* Get the trimming configuration
*/
getTrimConfig(): ITrimConfig;
/**
* Get configuration for a specific task
* @param taskType The type of task
*/
getTaskConfig(taskType: TaskType): ITaskConfig;
/**
* Get the maximum tokens allowed for context
*/
getMaxTokens(): number;
/**
* Update the configuration
* @param config The new configuration
*/
updateConfig(config: Partial<IContextConfig>): Promise<void>;
}