import { ExpressionType } from './expression-type.js'; import type { TypedLambdaExpression } from './lambda-expression.js'; import type { BinaryExpression } from './binary-expression.js'; import type { UnaryExpression } from './unary-expression.js'; import type { MemberExpression } from './member-expression.js'; import type { ConstantExpression } from './constant-expression.js'; import type { ParameterExpression } from './parameter-expression.js'; import type { CallExpression } from './call-expression.js'; import type { ApplySymbolExpression } from './apply-symbol-expression.js'; import type { NewExpression } from './new-expression.js'; import type { ExpressionVisitor } from './visitors/expression-visitor.js'; import type { IVisitable } from './visitable.js'; import type { FormatExpression } from '../parser.js'; import type { TernaryExpression } from './ternary-expression.js'; import type { AssignmentExpression } from './assignment-expression.js'; export type UnknownExpression = { type: ExpressionType.Unknown, accept(visitor: ExpressionVisitor): Expressions }; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type StrictTypedExpression = ConstantExpression | ParameterExpression | FormatExpression | MemberExpression | ApplySymbolExpression | NewExpression; export type TypedExpression = StrictTypedExpression; export type Predicate = (a: T) => boolean; export type Project = (a: T) => U; export type Project2 = (a: T, b: U) => V; export type PredicateAsync = (a: T) => PromiseLike; export type ProjectAsync = (a: T) => PromiseLike; export type Project2Async = (a: T, b: U) => PromiseLike; export type IEnumerable = Iterable; export abstract class Expression { abstract get type(): ExpressionType; abstract accept(visitor: ExpressionVisitor): Expressions; } /* eslint-disable @typescript-eslint/no-explicit-any */ export type StrictExpressions = (ApplySymbolExpression | BinaryExpression | TernaryExpression | FormatExpression | CallExpression | ParameterExpression | TypedLambdaExpression<(...args: unknown[]) => unknown> | MemberExpression | UnaryExpression | ConstantExpression | NewExpression) & IVisitable | AssignmentExpression ; /* eslint-enable @typescript-eslint/no-explicit-any */ export type Expressions = StrictExpressions | UnknownExpression | UnaryExpression | BinaryExpression | TernaryExpression;