import type { BooleanLiteralToken, ExternalScopeToken, IndexedScopeToken, InspectScopeToken, MergedDataToken, NullLiteralToken, NumberLiteralToken, PathElementToken, PipeFunctionToken, PipeableScopeWithPathToken, RegExpLiteralToken, ResolvedPipeToken, ResolvedValueToken, RootScopeToken, ScopeToken, ScopeWithPathToken, StringLiteralToken, TaggedIndexedScopeToken, ThisScopeToken, UndefinedLiteralToken, UnresolvedValueToken } from './types.internal'; export declare const makeStringLiteral: (value: string) => StringLiteralToken; export declare const makeNumberLiteral: (value: number) => NumberLiteralToken; export declare const makeBooleanLiteral: (value: boolean) => BooleanLiteralToken; export declare const makeRegExpLiteral: (re: RegExp) => RegExpLiteralToken; export declare const makeMergeField: (value: ScopeWithPathToken) => PipeableScopeWithPathToken; export declare const makeUndefinedLiteral: () => UndefinedLiteralToken; export declare const makeNullLiteral: () => NullLiteralToken; export declare const makeMergedData: (data: unknown) => MergedDataToken; export declare const makePathElement: (name: string) => PathElementToken; export declare const makeThisScope: () => ThisScopeToken; export declare const makeParentScope: (index: number) => IndexedScopeToken; export declare const makeRootScope: () => RootScopeToken; export declare const makeExternalScope: () => ExternalScopeToken; export declare const makeTaggedIndexedScope: (tag: string, index: number) => TaggedIndexedScopeToken; export declare const makeInspectScope: () => InspectScopeToken; export declare const makeEmptyRootToken: (scopeToken?: ScopeToken) => ScopeWithPathToken; export declare const makePipeToken: (name: string, args: UnresolvedValueToken[]) => PipeFunctionToken; /** * A curried function takes in a piece of AST representing an unresolved pipe, and resolved pipe arguments (operands). * Combines the pipe token name with the resolved operands to create a resolved pipe token. * * @param unresolvedPipe a pipe token, without any data associated with it. * @return a resolved pipe token representing the pipe name and resolved pipe arguments (before the pipe itself is resolved). Arguments are just operands. */ export declare const resolvePipeToken: (unresolvedPipe: PipeFunctionToken) => (resolvedOperands: readonly ResolvedValueToken[]) => ResolvedPipeToken; /** * Takes a string identifier for a path element, creates a path element out of it, * and adds it to the paths in the root token * * @param identifier one particular path element * @return a root token with a path element created from the identifier added to the paths */ export declare const addPath: (identifier: string) => (existingRoot: ScopeWithPathToken) => ScopeWithPathToken; /** * Takes the root token, takes a list of path element tokens, and adds the tokens to the root token paths * and adds it to the paths in the root token * * @param existingRoot the root token * @return a root token with a list of path element tokens added to it's paths */ export declare const addPathToRoot: (existingRoot: ScopeWithPathToken) => (identifiers: PathElementToken[]) => ScopeWithPathToken; /** * Takes any operand token, a list of pipe tokens, and adds the pipe tokens to the operand token * * @param token the token to be appended * @param pipes list of pipe tokens * @return the passed in operand token */ export declare const addPipes: (token: T, pipes: PipeFunctionToken[]) => T; export declare const isStringLiteral: (item: any) => item is StringLiteralToken; export declare const isNumberLiteral: (item: any) => item is NumberLiteralToken; export declare const isBooleanLiteral: (item: any) => item is BooleanLiteralToken; export declare const isRegExpLiteral: (item: any) => item is RegExpLiteralToken; export declare const isUndefinedLiteral: (item: any) => item is UndefinedLiteralToken; export declare const isNullLiteral: (item: any) => item is NullLiteralToken; export declare const isMergedData: (item: any) => item is MergedDataToken; export declare const isPathElement: (item: any) => item is PathElementToken; export declare const isScopeWithPath: (item: any) => item is ScopeWithPathToken; export declare const isPipeFunction: (item: any) => item is PipeFunctionToken; export declare const isMergeFieldLiteral: (item: any) => item is PipeableScopeWithPathToken; /** * Extracts the constant value stored within a constant literal token (string, number, boolean, * RegExp, undefined, or null) * * @template T * @param input The literal token * @return the raw value that the token * represents */ export declare const extractValueFromConstantLiteralToken: (input: T) => RegExp | boolean | number | string | null | undefined;