export type Piece = { kind: 'token'; value: string; } | { kind: 'literal'; value: string; }; export interface SpannedPiece { kind: 'token' | 'literal'; value: string; start: number; end: number; } /** * Splits a format string like `"yyyy-MM-dd 'at' HH:mm"` into token/literal * pieces, each with its exact source span. Text in single quotes is always * literal (e.g. write 'rd' in "3rd" so it's not read as the day token). A * doubled quote ('') means a literal quote character, both inside a quoted * span and standalone. */ export declare function tokenizeWithSpans(format: string): SpannedPiece[]; /** * Splits a format string like `"yyyy-MM-dd 'at' HH:mm"` into token/literal * pieces. Text in single quotes is always literal (e.g. write 'rd' in * "3rd" so it's not read as the day token). A doubled quote ('') means a * literal quote character, both inside a quoted span and standalone. */ export declare function tokenize(format: string): Piece[];