import { PathSegment } from './types'; /** * Utility class for parsing and accessing object paths using both dot and array notation */ export declare class PathAccessor { /** * Parse a path string into segments * Examples: * "foo.bar" -> [{type: 'property', value: 'foo'}, {type: 'property', value: 'bar'}] * "foo[0].bar" -> [{type: 'property', value: 'foo'}, {type: 'index', value: '0'}, {type: 'property', value: 'bar'}] * "foo['bar']" -> [{type: 'property', value: 'foo'}, {type: 'property', value: 'bar'}] * "foo[bar[0]]" -> [{type: 'property', value: 'foo'}, {type: 'expression', value: 'bar[0]'}] * @throws {PathSyntaxError} If the path syntax is invalid */ static parsePath(path: string): PathSegment[]; /** * Get a value from an object using a path string * @param obj The object to get the value from * @param path The path to the value * @param evaluateExpression Optional callback to evaluate expressions in array brackets * @throws {PropertyAccessError} If a property access fails * @throws {PathSyntaxError} If the path syntax is invalid */ static get(obj: any, path: string, evaluateExpression?: (expr: string) => any): any; /** * Check if a path exists in an object */ static has(obj: any, path: string): boolean; /** * Get the root segment of a path (before any dots or brackets) * @throws {InvalidPathError} If the path is empty or invalid */ static getRoot(path: string): string; /** * Format a path segment for use in error messages */ static formatSegment(segment: PathSegment): string; /** * Format a full path for use in error messages */ static formatPath(segments: PathSegment[]): string; }