import type { Combinator, GatedArm } from '../types.ts'; type ArmParser = T extends GatedArm ? Combinator : T extends Combinator ? Combinator : never; type UnionArms | GatedArm)[]> = { [K in keyof T]: ArmParser; }[number] extends Combinator ? U : never; export declare function choice | GatedArm, ...(Combinator | GatedArm)[]]>(...args: T): Combinator>; /** * Peel wrappers that neither consume input nor skip trivia before their inner * sequence -- `node`, `parser`/`grammar`, `transform`, `label` -- down to the core * `sequence` and return its FIRST term (the candidate shared prefix), or null when * the arm is not a wrapped-or-bare sequence with >=2 terms. Because none of these * wrappers advance the position before the sequence's first term, the term is parsed * at the arm's entry position in every arm, so the once-recognized prefix can be * replayed there. `attempt`/`optional`/`many`/`choice`/etc. are NOT peeled, so such * arms are conservatively excluded. */ export declare function leadingTermOfArm(arm: Combinator): Combinator | null; /** Walk transform wrappers to find an inner literal's string value. */ export declare function getCoreLiteralValue(p: Combinator): string | null; /** Walk transform wrappers to find an inner regex's source/flags. */ export declare function getCoreRegexDef(p: Combinator): { source: string; flags: string; } | null; export {}; //# sourceMappingURL=choice.d.ts.map