import type { SourceCodeInfo } from '../../../../tokenizer/token'; import type { MaybePromise } from '../../../../utils/maybePromise'; import type { BuiltinNormalExpression, BuiltinNormalExpressions } from '../../../../builtin/interface'; type SeqKey = `${T}-seq`; type TakeWhileKey = `${T}-take-while`; type NthKey = `${T}-nth`; type PredKey = `${T}?`; type SeqFunction = (length: number, sourceCodeInfo: SourceCodeInfo | undefined) => Type[]; type TakeWhileFunction = (pred: (value: Type, index: number) => MaybePromise, sourceCodeInfo: SourceCodeInfo | undefined) => MaybePromise; type PredFunction = (n: Type, sourceCodeInfo: SourceCodeInfo | undefined) => boolean; export type SequenceKeys = SeqKey | TakeWhileKey | NthKey | PredKey; export type SequenceDefinition = { [key in Exclude, NthKey>]: key extends SeqKey ? SeqFunction : key extends TakeWhileKey ? TakeWhileFunction : PredFunction; } & { maxLength?: number; } & (Type extends string ? { string: true; } : { string?: never; }) & { noNth?: true; }; export type SequenceNormalExpressions = { [key in SequenceKeys]: key extends SeqKey ? BuiltinNormalExpression : key extends TakeWhileKey ? BuiltinNormalExpression : key extends NthKey ? BuiltinNormalExpression : BuiltinNormalExpression; }; export declare const sequenceNormalExpressions: BuiltinNormalExpressions; export {};