credl-parser-evaluator
Version:
TypeScript-based CREDL Parser and Evaluator that processes CREDL files and outputs complete Intermediate Representations
72 lines • 1.94 kB
TypeScript
import { CREDLFile, ValidationError, PresetProfile } from '../types/CREDLTypes';
/**
* PresetResolver handles parsing and storage of preset definitions
*/
export declare class PresetResolver {
private presets;
/**
* Parse and store preset definitions from a CREDL file
*/
parsePresets(credlFile: CREDLFile, errors: ValidationError[], warnings: ValidationError[]): void;
/**
* Process a preset category
*/
private processPresetCategory;
/**
* Validate and store a single preset definition
*/
private validateAndStorePreset;
/**
* Validate preset values structure and types
*/
private validatePresetValues;
/**
* Check if a value is valid for preset storage
*/
private isValidPresetValue;
/**
* Calculate the depth of nested objects
*/
private getObjectDepth;
/**
* Get a preset by name
*/
getPreset(name: string): PresetProfile | undefined;
/**
* Get a specific preset value by key path
*/
getPresetValue(key: string): any;
/**
* Check if a preset exists
*/
hasPreset(name: string): boolean;
/**
* Get all preset names
*/
getPresetNames(): string[];
/**
* Resolve a preset reference (e.g., "@lease_profiles.standard_office.rent_psf" or "lease_profiles.standard_office.rent_psf")
*/
resolvePresetReference(reference: string): any;
/**
* Check if a string is a preset reference
*/
isPresetReference(fieldName: string): boolean;
/**
* Get validation summary
*/
getValidationSummary(): {
totalPresets: number;
presetNames: string[];
sampleValues: string[];
};
/**
* Clear all presets
*/
clear(): void;
/**
* Get all presets (for debugging/inspection)
*/
getAllPresets(): Map<string, PresetProfile>;
}
//# sourceMappingURL=PresetResolver.d.ts.map