;
declare function isSelectorNested(node: BaseNode): node is SelectorNested;
interface SelectorNestedNode extends BaseNode {
type: 'SelectorNested';
base: SelectorNode;
nested: SelectorNested;
}
interface ThisNode extends BaseNode {
type: 'This';
}
interface TupleNode extends BaseNode {
type: 'Tuple';
members: Array;
}
interface ValueNode {
type: 'Value';
value: P;
}
interface FunctionDeclarationNode {
type: 'FuncDeclaration';
namespace: string;
name: string;
params: ParameterNode[];
body: ExprNode;
}
interface FlatMapNode extends BaseNode {
type: 'FlatMap';
base: ExprNode;
expr: ExprNode;
}
interface MapNode extends BaseNode {
type: 'Map';
base: ExprNode;
expr: ExprNode;
}
interface AccessAttributeNode extends BaseNode {
type: 'AccessAttribute';
base?: T;
name: string;
}
interface AccessElementNode extends BaseNode {
type: 'AccessElement';
base: ExprNode;
index: number;
}
interface SliceNode extends BaseNode {
type: 'Slice';
base: ExprNode;
left: number;
right: number;
isInclusive: boolean;
}
interface FilterNode extends BaseNode {
type: 'Filter';
base: Base;
expr: ExprNode;
}
interface ProjectionNode extends BaseNode {
type: 'Projection';
base: ExprNode;
expr: ExprNode;
}
declare class Path {
private pattern;
private patternRe;
constructor(pattern: string);
matches(str: string): boolean;
toJSON(): string;
}
declare class StaticValue {
data: P;
type: T;
constructor(data: P, type: T);
isArray(): boolean;
get(): Promise;
asStatic(): this;
[Symbol.asyncIterator](): Generator;
}
declare class DateTime {
date: Date;
constructor(date: Date);
static parseToValue(str: string): DateTimeValue | NullValue;
equals(other: DateTime): boolean;
add(secs: number): DateTime;
difference(other: DateTime): number;
compareTo(other: DateTime): number;
toString(): string;
toJSON(): string;
}
/**
* Returns a normalized JavaScript value. This eliminates internal values
* such as DateTime and Path by turning them into the JSON representation.
*/
declare function toJS(val: AnyStaticValue): unknown;
/**
* A type of a value in GROQ.
*/
type GroqType = 'null' | 'boolean' | 'number' | 'string' | 'array' | 'object' | 'path' | 'datetime';
/**
* The result of an expression.
*/
type Value = AnyStaticValue | StreamValue;
type StringValue = StaticValue;
type NumberValue = StaticValue;
type NullValue = StaticValue;
type BooleanValue = StaticValue;
type DateTimeValue = StaticValue;
type PathValue = StaticValue;
type ObjectValue = StaticValue, 'object'>;
type ArrayValue = StaticValue;
type AnyStaticValue = StringValue | NumberValue | NullValue | BooleanValue | DateTimeValue | ObjectValue | ArrayValue | PathValue;
declare class StreamValue {
type: 'stream';
private generator;
private ticker;
private isDone;
private data;
constructor(generator: () => AsyncGenerator);
isArray(): boolean;
get(): Promise;
asStatic(): Promise;
[Symbol.asyncIterator](): AsyncGenerator;
_nextTick(): Promise;
}
export { SelectNode as $, FilterNode as A, ObjectAttributeValueNode as B, AscNode as C, DescNode as D, DerefNode as E, InRangeNode as F, OpCallNode as G, ObjectNode as H, MapNode as I, ParentNode as J, OrNode as K, NegNode as L, FuncCallNode as M, FunctionDeclarationNode as N, EverythingNode as O, GroupNode as P, SelectAlternativeNode as Q, NotNode as R, ArrayNode as S, ContextNode as T, ObjectSplatNode as U, ObjectConditionalSplatNode as V, OpCall as W, PosNode as X, PipeFuncCallNode as Y, ProjectionNode as Z, AccessAttributeNode as _, DateTimeValue as a, SyntaxNode as at, ArrayCoerceNode as b, NumberValue as c, ValueNode as ct, StringValue as d, SelectorFuncCallNode as et, Value as f, Path as g, toJS as h, BooleanValue as i, SliceNode as it, FlatMapNode as j, ExprNode as k, ObjectValue as l, isSelectorNested as lt, StaticValue as m, AnyStaticValue as n, SelectorNestedNode as nt, GroqType as o, ThisNode as ot, DateTime as p, ParameterNode as q, ArrayValue as r, SelectorNode as rt, NullValue as s, TupleNode as st, StreamValue as t, SelectorNested as tt, PathValue as u, isSelectorNode as ut, AccessElementNode as v, BaseNode as w, ArrayElementNode as x, AndNode as y, ObjectAttributeNode as z };
//# sourceMappingURL=shared-B-KhUIgP.d.ts.map