Options
All
  • Public
  • Public/Protected
  • All
Menu

A lookup expression is a call expression using the lookup operator. Then only difference is that the lookup table definition (first argument) is cached as a map for fast search (see {@link ExprEvaluator.visitLookupExpr}).

internal

Hierarchy

Index

Constructors

constructor

Properties

Readonly args

args: Expr[]

Arguments of the lookup expression. At least an argument for the lookup table.

Optional descriptor

descriptor: OperatorDescriptor

Readonly op

op: string

Accessors

children

  • get children(): Expr[]

Methods

accept

  • accept<Result, Context>(visitor: ExprVisitor<Result, Context>, context: Context): Result

dependencies

evaluate

Protected exprIsDynamic

  • exprIsDynamic(): boolean

instantiate

intern

  • intern(pool: ExprPool): Expr

isDynamic

  • isDynamic(): boolean

toJSON

Static fromJSON

  • Creates a style expression from JSON.

    remarks

    The optional set of definitions is used to resolve the ref expressions.

    example
    const expr = Expr.fromJSON(["all",
        ["==", ["geometry-type"], "LineString"],
        ["has", "text"]
    ]);

    Parameters

    • json: JsonValue

      JSON object representing the expression to parse.

    • Optional definitions: Definitions

      Optional set of definitions used to expand references.

    • Optional definitionExprCache: Map<string, Expr>

      Optional cache of Expr instances

    Returns Expr

Static isExpr

  • isExpr(value: any): value is Expr

Static parse

  • parse(code: string): Expr | never

Static parseArray

  • parseArray(node: JsonArray, referenceResolverState?: ReferenceResolverState): Expr

Generated using TypeDoc