UNPKG

@kermank/nldp

Version:

A modular date/time parser for converting natural language into dates and times

31 lines 851 B
export interface RuleMatchTrace { ruleName: string; input: string; matched: boolean; pattern?: string; matches?: string[]; } export interface ParseTrace { input: string; matchAttempts: RuleMatchTrace[]; finalResult?: any; } export type DebugTraceState = { currentTrace: ParseTrace | null; lastTrace: ParseTrace | null; }; export declare const createDebugTrace: () => { startTrace: (input: string) => void; addRuleMatch: (trace: RuleMatchTrace) => void; endTrace: () => void; getTrace: () => ParseTrace | null; clear: () => void; }; export declare const debugTrace: { startTrace: (input: string) => void; addRuleMatch: (trace: RuleMatchTrace) => void; endTrace: () => void; getTrace: () => ParseTrace | null; clear: () => void; }; //# sourceMappingURL=debug-trace.d.ts.map