mathrok
Version:
AI-powered symbolic mathematics library combining traditional Computer Algebra System (CAS) capabilities with natural language processing for math problem solving
90 lines • 2.3 kB
TypeScript
/**
* Configuration manager for Mathrok library
* Handles library configuration and settings
*/
import type { MathConfig, FunctionDefinition } from '../types/core.js';
/**
* Configuration manager class
*/
export declare class ConfigManager {
private config;
private readonly customFunctions;
constructor(initialConfig?: Partial<MathConfig>);
/**
* Get current configuration
*/
get(): MathConfig;
/**
* Set configuration values
*/
set(newConfig: Partial<MathConfig>): void;
/**
* Reset configuration to defaults
*/
reset(): void;
/**
* Get a specific configuration value
*/
getValue<K extends keyof MathConfig>(key: K): MathConfig[K];
/**
* Set a specific configuration value
*/
setValue<K extends keyof MathConfig>(key: K, value: MathConfig[K]): void;
/**
* Add a custom function definition
*/
addFunction(definition: FunctionDefinition): void;
/**
* Remove a custom function
*/
removeFunction(name: string): void;
/**
* Get a custom function definition
*/
getFunction(name: string): FunctionDefinition | undefined;
/**
* Get all custom functions
*/
getAllFunctions(): FunctionDefinition[];
/**
* Check if a function is defined
*/
hasFunction(name: string): boolean;
/**
* Get configuration as JSON string
*/
toJSON(): string;
/**
* Load configuration from JSON string
*/
fromJSON(json: string): void;
/**
* Create a scoped configuration
*/
createScope(overrides: Partial<MathConfig>): ConfigManager;
/**
* Validate configuration values
*/
private validateConfig;
/**
* Validate function definition
*/
private validateFunctionDefinition;
/**
* Check if object is a valid function definition
*/
private isValidFunctionDefinition;
/**
* Get default configuration
*/
static getDefaults(): MathConfig;
/**
* Merge multiple configurations
*/
static merge(...configs: Partial<MathConfig>[]): MathConfig;
/**
* Create configuration from environment variables
*/
static fromEnvironment(): Partial<MathConfig>;
}
//# sourceMappingURL=config.d.ts.map