Options
All
  • Public
  • Public/Protected
  • All
Menu

Number literal expression.

internal

Hierarchy

Index

Constructors

constructor

Properties

Readonly value

value: number

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 fromValue

Static isExpr

  • isExpr(value: any): value is Expr

Static parse

  • parse(code: string): Expr | never

Generated using TypeDoc