For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Class PropertyValue<T, R>

PropertyValue represents the value part of a property key-value unit. It's used to represent both paint and layout property values, and regardless of whether or not their property supports data-driven expressions.

PropertyValue stores the raw input value as seen in a style or a runtime styling API call, i.e. one of the following:

  • A constant value of the type appropriate for the property
  • A function which produces a value of that type (but functions are quasi-deprecated in favor of expressions)
  • An expression which produces a value of that type
  • "undefined"/"not present", in which case the property is assumed to take on its default value.

In addition to storing the original input value, PropertyValue also stores a normalized representation, effectively treating functions as if they are expressions, and constant or default values as if they are (constant) expressions.

Type Parameters

  • T
  • R
Index

Constructors

Properties

property: Property<T, R>

Methods

  • Returns Set<string>

  • Returns boolean

  • Whether the expression reads one of the global state keys in refs.

    Parameters

    • refs: string[]

    Returns boolean

Was this helpful?