For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Function diff
- diff(
before?: StyleSpecification,
after: StyleSpecification,
): (
| { args: [StyleSpecification]; command: "setStyle" }
| { args: [LayerSpecification, string | undefined]; command: "addLayer" }
| { args: [string]; command: "removeLayer" }
| {
args: [
string,
keyof AllPaintProperties,
| string
| number
| boolean
| ["array", ExpressionSpecification]
| ["array", "string" | "number" | "boolean", ExpressionSpecification]
| [
"array",
"string"
| "number"
| "boolean",
number,
ExpressionSpecification,
]
| ["boolean", unknown, ...unknown[]]
| CollatorExpressionSpecification
| [
"format",
...(
| string
| ExpressionSpecification
| ["image", ExpressionSpecification]
| {
"font-scale"?: number | ExpressionSpecification | undefined;
"text-color"?: string | ExpressionSpecification | undefined;
"text-font"?: ExpressionSpecification | undefined;
"vertical-align"?: "bottom" | "center" | "top";
}
)[],
]
| ["image", string | ExpressionSpecification]
| ["literal", unknown]
| ["semiliteral", unknown]
| ["number", unknown, ...unknown[]]
| [
"number-format",
number
| ExpressionSpecification,
{
currency?: string | ExpressionSpecification;
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
},
]
| [
"number-format",
number
| ExpressionSpecification,
{
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
unit?: string | ExpressionSpecification;
},
]
| ["object", unknown, ...unknown[]]
| ["string", unknown, ...unknown[]]
| ["to-boolean", unknown]
| ["to-color", unknown, ...unknown[]]
| ["to-number", unknown, ...unknown[]]
| ["to-string", unknown]
| ["typeof", unknown]
| ["accumulated"]
| ["feature-state", string | ExpressionSpecification]
| ["geometry-type"]
| ["id"]
| ["line-progress"]
| ["properties"]
| ["at", number | ExpressionSpecification, ExpressionSpecification]
| ["get", string | ExpressionSpecification, ExpressionSpecification?]
| ["global-state", string]
| ["has", string | ExpressionSpecification, ExpressionSpecification?]
| [
"in",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
]
| [
"index-of",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["length", string | ExpressionSpecification]
| [
"slice",
string
| ExpressionSpecification,
number | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["!", boolean | ExpressionSpecification]
| [
"!=",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"==",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| ["all", ...(boolean | ExpressionSpecification)[]]
| ["any", ...(boolean | ExpressionSpecification)[]]
| [
"case",
boolean
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType | null,
...(ExpressionSpecification | ExpressionInputType | null)[],
ExpressionSpecification | ExpressionInputType | null,
]
| ["coalesce", ...(ExpressionSpecification | ExpressionInputType)[]]
| [
"match",
string
| number
| ExpressionSpecification,
string | number | string[] | number[],
ExpressionSpecification | ExpressionInputType | null,
...(
| ExpressionSpecification
| string[]
| ExpressionInputType
| number[]
| null
)[],
ExpressionSpecification
| ExpressionInputType
| null,
]
| ["within", GeoJSON<Geometry, GeoJsonProperties>]
| [
"interpolate",
InterpolationSpecification,
number
| ExpressionSpecification,
...(
| string
| number
| ["array", ExpressionSpecification]
| ["array", "string" | "number" | "boolean", ExpressionSpecification]
| [
"array",
"string"
| "number"
| "boolean",
number,
ExpressionSpecification,
]
| ["boolean", unknown, ...unknown[]]
| CollatorExpressionSpecification
| [
"format",
...(
| string
| ExpressionSpecification
| ["image", ExpressionSpecification]
| {
"font-scale"?: number | ExpressionSpecification | undefined;
"text-color"?: string | ExpressionSpecification | undefined;
"text-font"?: ExpressionSpecification | undefined;
"vertical-align"?: (...) | (...) | (...) | (...);
}
)[],
]
| ["image", string | ExpressionSpecification]
| ["literal", unknown]
| ["semiliteral", unknown]
| ["number", unknown, ...unknown[]]
| [
"number-format",
number
| ExpressionSpecification,
{
currency?: string | ExpressionSpecification;
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
},
]
| [
"number-format",
number
| ExpressionSpecification,
{
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
unit?: string | ExpressionSpecification;
},
]
| ["object", unknown, ...unknown[]]
| ["string", unknown, ...unknown[]]
| ["to-boolean", unknown]
| ["to-color", unknown, ...unknown[]]
| ["to-number", unknown, ...unknown[]]
| ["to-string", unknown]
| ["typeof", unknown]
| ["accumulated"]
| ["feature-state", string | ExpressionSpecification]
| ["geometry-type"]
| ["id"]
| ["line-progress"]
| ["properties"]
| ["at", number | ExpressionSpecification, ExpressionSpecification]
| ["get", string | ExpressionSpecification, ExpressionSpecification?]
| ["global-state", string]
| ["has", string | ExpressionSpecification, ExpressionSpecification?]
| [
"in",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
]
| [
"index-of",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["length", string | ExpressionSpecification]
| [
"slice",
string
| ExpressionSpecification,
number | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["!", boolean | ExpressionSpecification]
| [
"!=",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"==",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| ["all", ...(boolean | ExpressionSpecification)[]]
| ["any", ...(boolean | ExpressionSpecification)[]]
| [
"case",
boolean
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType | null,
...(ExpressionSpecification | ExpressionInputType | null)[],
ExpressionSpecification | ExpressionInputType | null,
]
| ["coalesce", ...(ExpressionSpecification | ExpressionInputType)[]]
| [
"match",
string
| number
| ExpressionSpecification,
string | number | string[] | number[],
ExpressionSpecification | ExpressionInputType | null,
...(
| ExpressionSpecification
| string[]
| ExpressionInputType
| number[]
| null
)[],
ExpressionSpecification
| ExpressionInputType
| null,
]
| ["within", GeoJSON<Geometry, GeoJsonProperties>]
| (
["interpolate", InterpolationSpecification, number | ExpressionSpecification, ...(string | number | ["array", ExpressionSpecification] | ... 92 more ... | { ...; })[]]
)
| [
"interpolate-hcl",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"interpolate-lab",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"step",
number
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| [
"let",
string,
ExpressionSpecification
| ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| VariableExpressionSpecification
| ["concat", ...(ExpressionSpecification | ExpressionInputType)[]]
| ["downcase", string | ExpressionSpecification]
| ["is-supported-script", string | ExpressionSpecification]
| [
"join",
ExpressionSpecification
| string[],
string | ExpressionSpecification,
]
| ["resolved-locale", CollatorExpressionSpecification]
| [
"split",
string
| ExpressionSpecification,
string | ExpressionSpecification,
]
| ["upcase", string | ExpressionSpecification]
| [
"rgb",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"rgba",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| ["to-rgba", string | ExpressionSpecification]
| [
"-",
number
| ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| [
"*",
number
| ExpressionSpecification,
number | ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"/",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"%",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"^",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| ["+", ...(number | ExpressionSpecification)[]]
| ["abs", number | ExpressionSpecification]
| ["acos", number | ExpressionSpecification]
| ["asin", number | ExpressionSpecification]
| ["atan", number | ExpressionSpecification]
| ["ceil", number | ExpressionSpecification]
| ["cos", number | ExpressionSpecification]
| ["distance", GeoJSON<Geometry, GeoJsonProperties>]
| ["e"]
| ["floor", number | ExpressionSpecification]
| ["ln", number | ExpressionSpecification]
| ["ln2"]
| ["log10", number | ExpressionSpecification]
| ["log2", number | ExpressionSpecification]
| [
"max",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"min",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| ["pi"]
| ["round", number | ExpressionSpecification]
| ["sin", number | ExpressionSpecification]
| ["sqrt", number | ExpressionSpecification]
| ["tan", number | ExpressionSpecification]
| ["zoom"]
| ["heatmap-density"]
| ["elevation"]
| ProjectionDefinitionT
| { stops: [number, ProjectionDefinitionT][]; type: "exponential" }
| { stops: [number, ProjectionDefinitionT][]; type: "interval" }
)[],
]
| [
"interpolate-hcl",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"interpolate-lab",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"step",
number
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| [
"let",
string,
ExpressionSpecification
| ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| VariableExpressionSpecification
| ["concat", ...(ExpressionSpecification | ExpressionInputType)[]]
| ["downcase", string | ExpressionSpecification]
| ["is-supported-script", string | ExpressionSpecification]
| [
"join",
ExpressionSpecification
| string[],
string | ExpressionSpecification,
]
| ["resolved-locale", CollatorExpressionSpecification]
| [
"split",
string
| ExpressionSpecification,
string | ExpressionSpecification,
]
| ["upcase", string | ExpressionSpecification]
| [
"rgb",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"rgba",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| ["to-rgba", string | ExpressionSpecification]
| [
"-",
number
| ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| [
"*",
number
| ExpressionSpecification,
number | ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"/",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"%",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"^",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| ["+", ...(number | ExpressionSpecification)[]]
| ["abs", number | ExpressionSpecification]
| ["acos", number | ExpressionSpecification]
| ["asin", number | ExpressionSpecification]
| ["atan", number | ExpressionSpecification]
| ["ceil", number | ExpressionSpecification]
| ["cos", number | ExpressionSpecification]
| ["distance", GeoJSON<Geometry, GeoJsonProperties>]
| ["e"]
| ["floor", number | ExpressionSpecification]
| ["ln", number | ExpressionSpecification]
| ["ln2"]
| ["log10", number | ExpressionSpecification]
| ["log2", number | ExpressionSpecification]
| [
"max",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"min",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| ["pi"]
| ["round", number | ExpressionSpecification]
| ["sin", number | ExpressionSpecification]
| ["sqrt", number | ExpressionSpecification]
| ["tan", number | ExpressionSpecification]
| ["zoom"]
| ["heatmap-density"]
| ["elevation"]
| string[]
| number[]
| { stops: [number, boolean][]; type: "exponential" }
| { stops: [number, boolean][]; type: "interval" }
| { stops: [number, number][]; type: "exponential" }
| { stops: [number, number][]; type: "interval" }
| {
default?: number;
property: string;
stops: [number, number][];
type: "exponential";
}
| {
default?: number;
property: string;
stops: [number, number][];
type: "interval";
}
| {
default?: number;
property: string;
stops: [string | number | boolean, number][];
type: "categorical";
}
| { default?: number; property: string; type: "identity" }
| {
default?: number;
property: string;
stops: [{ value: number; zoom: number }, number][];
type: "exponential";
}
| {
default?: number;
property: string;
stops: [{ value: number; zoom: number }, number][];
type: "interval";
}
| {
default?: number;
property: string;
stops: [{ value: string | number | boolean; zoom: number }, number][];
type: "categorical";
}
| TransitionSpecification
| { stops: [number, string][]; type: "exponential" }
| { stops: [number, string][]; type: "interval" }
| {
default?: string;
property: string;
stops: [number, string][];
type: "exponential";
}
| {
default?: string;
property: string;
stops: [number, string][];
type: "interval";
}
| {
default?: string;
property: string;
stops: [string | number | boolean, string][];
type: "categorical";
}
| { default?: string; property: string; type: "identity" }
| {
default?: string;
property: string;
stops: [{ value: number; zoom: number }, string][];
type: "exponential";
}
| {
default?: string;
property: string;
stops: [{ value: number; zoom: number }, string][];
type: "interval";
}
| {
default?: string;
property: string;
stops: [{ value: string | number | boolean; zoom: number }, string][];
type: "categorical";
}
| [number, number]
| { stops: [number, [number, number]][]; type: "exponential" }
| { stops: [number, [number, number]][]; type: "interval" }
| { stops: [number, "map" | "viewport"][]; type: "exponential" }
| { stops: [number, "map" | "viewport"][]; type: "interval" }
| { stops: [number, number[]][]; type: "exponential" }
| { stops: [number, number[]][]; type: "interval" }
| {
default?: number[];
property: string;
stops: [number, number[]][];
type: "exponential";
}
| {
default?: number[];
property: string;
stops: [number, number[]][];
type: "interval";
}
| {
default?: number[];
property: string;
stops: [string | number | boolean, number[]][];
type: "categorical";
}
| { default?: number[]; property: string; type: "identity" }
| {
default?: number[];
property: string;
stops: [{ value: number; zoom: number }, number[]][];
type: "exponential";
}
| {
default?: number[];
property: string;
stops: [{ value: number; zoom: number }, number[]][];
type: "interval";
}
| {
default?: number[];
property: string;
stops: [{ value: string | number | boolean; zoom: number }, number[]][];
type: "categorical";
}
| { stops: [number, "linear" | "nearest"][]; type: "exponential" }
| { stops: [number, "linear" | "nearest"][]; type: "interval" }
| { stops: [number, NumberArraySpecification][]; type: "exponential" }
| { stops: [number, NumberArraySpecification][]; type: "interval" }
| { stops: [number, ColorArraySpecification][]; type: "exponential" }
| { stops: [number, ColorArraySpecification][]; type: "interval" }
| {
stops: [
number,
"standard"
| "basic"
| "combined"
| "igor"
| "multidirectional",
][];
type: "exponential";
}
| {
stops: [
number,
"standard"
| "basic"
| "combined"
| "igor"
| "multidirectional",
][];
type: "interval";
}
| undefined,
];
command: "setPaintProperty";
}
| {
args: [
string,
keyof AllLayoutProperties,
| string
| number
| boolean
| ["array", ExpressionSpecification]
| ["array", "string" | "number" | "boolean", ExpressionSpecification]
| [
"array",
"string"
| "number"
| "boolean",
number,
ExpressionSpecification,
]
| ["boolean", unknown, ...unknown[]]
| CollatorExpressionSpecification
| [
"format",
...(
| string
| ExpressionSpecification
| ["image", ExpressionSpecification]
| {
"font-scale"?: number | ExpressionSpecification | undefined;
"text-color"?: string | ExpressionSpecification | undefined;
"text-font"?: ExpressionSpecification | undefined;
"vertical-align"?: "bottom" | "center" | "top";
}
)[],
]
| ["image", string | ExpressionSpecification]
| ["literal", unknown]
| ["semiliteral", unknown]
| ["number", unknown, ...unknown[]]
| [
"number-format",
number
| ExpressionSpecification,
{
currency?: string | ExpressionSpecification;
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
},
]
| [
"number-format",
number
| ExpressionSpecification,
{
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
unit?: string | ExpressionSpecification;
},
]
| ["object", unknown, ...unknown[]]
| ["string", unknown, ...unknown[]]
| ["to-boolean", unknown]
| ["to-color", unknown, ...unknown[]]
| ["to-number", unknown, ...unknown[]]
| ["to-string", unknown]
| ["typeof", unknown]
| ["accumulated"]
| ["feature-state", string | ExpressionSpecification]
| ["geometry-type"]
| ["id"]
| ["line-progress"]
| ["properties"]
| ["at", number | ExpressionSpecification, ExpressionSpecification]
| ["get", string | ExpressionSpecification, ExpressionSpecification?]
| ["global-state", string]
| ["has", string | ExpressionSpecification, ExpressionSpecification?]
| [
"in",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
]
| [
"index-of",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["length", string | ExpressionSpecification]
| [
"slice",
string
| ExpressionSpecification,
number | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["!", boolean | ExpressionSpecification]
| [
"!=",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"==",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| ["all", ...(boolean | ExpressionSpecification)[]]
| ["any", ...(boolean | ExpressionSpecification)[]]
| [
"case",
boolean
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType | null,
...(ExpressionSpecification | ExpressionInputType | null)[],
ExpressionSpecification | ExpressionInputType | null,
]
| ["coalesce", ...(ExpressionSpecification | ExpressionInputType)[]]
| [
"match",
string
| number
| ExpressionSpecification,
string | number | string[] | number[],
ExpressionSpecification | ExpressionInputType | null,
...(
| ExpressionSpecification
| string[]
| ExpressionInputType
| number[]
| null
)[],
ExpressionSpecification
| ExpressionInputType
| null,
]
| ["within", GeoJSON<Geometry, GeoJsonProperties>]
| [
"interpolate",
InterpolationSpecification,
number
| ExpressionSpecification,
...(
| string
| number
| ["array", ExpressionSpecification]
| ["array", "string" | "number" | "boolean", ExpressionSpecification]
| [
"array",
"string"
| "number"
| "boolean",
number,
ExpressionSpecification,
]
| ["boolean", unknown, ...unknown[]]
| CollatorExpressionSpecification
| [
"format",
...(
| string
| ExpressionSpecification
| ["image", ExpressionSpecification]
| {
"font-scale"?: number | ExpressionSpecification | undefined;
"text-color"?: string | ExpressionSpecification | undefined;
"text-font"?: ExpressionSpecification | undefined;
"vertical-align"?: (...) | (...) | (...) | (...);
}
)[],
]
| ["image", string | ExpressionSpecification]
| ["literal", unknown]
| ["semiliteral", unknown]
| ["number", unknown, ...unknown[]]
| [
"number-format",
number
| ExpressionSpecification,
{
currency?: string | ExpressionSpecification;
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
},
]
| [
"number-format",
number
| ExpressionSpecification,
{
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
unit?: string | ExpressionSpecification;
},
]
| ["object", unknown, ...unknown[]]
| ["string", unknown, ...unknown[]]
| ["to-boolean", unknown]
| ["to-color", unknown, ...unknown[]]
| ["to-number", unknown, ...unknown[]]
| ["to-string", unknown]
| ["typeof", unknown]
| ["accumulated"]
| ["feature-state", string | ExpressionSpecification]
| ["geometry-type"]
| ["id"]
| ["line-progress"]
| ["properties"]
| ["at", number | ExpressionSpecification, ExpressionSpecification]
| ["get", string | ExpressionSpecification, ExpressionSpecification?]
| ["global-state", string]
| ["has", string | ExpressionSpecification, ExpressionSpecification?]
| [
"in",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
]
| [
"index-of",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["length", string | ExpressionSpecification]
| [
"slice",
string
| ExpressionSpecification,
number | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["!", boolean | ExpressionSpecification]
| [
"!=",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"==",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| ["all", ...(boolean | ExpressionSpecification)[]]
| ["any", ...(boolean | ExpressionSpecification)[]]
| [
"case",
boolean
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType | null,
...(ExpressionSpecification | ExpressionInputType | null)[],
ExpressionSpecification | ExpressionInputType | null,
]
| ["coalesce", ...(ExpressionSpecification | ExpressionInputType)[]]
| [
"match",
string
| number
| ExpressionSpecification,
string | number | string[] | number[],
ExpressionSpecification | ExpressionInputType | null,
...(
| ExpressionSpecification
| string[]
| ExpressionInputType
| number[]
| null
)[],
ExpressionSpecification
| ExpressionInputType
| null,
]
| ["within", GeoJSON<Geometry, GeoJsonProperties>]
| (
["interpolate", InterpolationSpecification, number | ExpressionSpecification, ...(string | number | ["array", ExpressionSpecification] | ... 92 more ... | { ...; })[]]
)
| [
"interpolate-hcl",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"interpolate-lab",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"step",
number
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| [
"let",
string,
ExpressionSpecification
| ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| VariableExpressionSpecification
| ["concat", ...(ExpressionSpecification | ExpressionInputType)[]]
| ["downcase", string | ExpressionSpecification]
| ["is-supported-script", string | ExpressionSpecification]
| [
"join",
ExpressionSpecification
| string[],
string | ExpressionSpecification,
]
| ["resolved-locale", CollatorExpressionSpecification]
| [
"split",
string
| ExpressionSpecification,
string | ExpressionSpecification,
]
| ["upcase", string | ExpressionSpecification]
| [
"rgb",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"rgba",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| ["to-rgba", string | ExpressionSpecification]
| [
"-",
number
| ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| [
"*",
number
| ExpressionSpecification,
number | ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"/",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"%",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"^",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| ["+", ...(number | ExpressionSpecification)[]]
| ["abs", number | ExpressionSpecification]
| ["acos", number | ExpressionSpecification]
| ["asin", number | ExpressionSpecification]
| ["atan", number | ExpressionSpecification]
| ["ceil", number | ExpressionSpecification]
| ["cos", number | ExpressionSpecification]
| ["distance", GeoJSON<Geometry, GeoJsonProperties>]
| ["e"]
| ["floor", number | ExpressionSpecification]
| ["ln", number | ExpressionSpecification]
| ["ln2"]
| ["log10", number | ExpressionSpecification]
| ["log2", number | ExpressionSpecification]
| [
"max",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"min",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| ["pi"]
| ["round", number | ExpressionSpecification]
| ["sin", number | ExpressionSpecification]
| ["sqrt", number | ExpressionSpecification]
| ["tan", number | ExpressionSpecification]
| ["zoom"]
| ["heatmap-density"]
| ["elevation"]
| ProjectionDefinitionT
| { stops: [number, ProjectionDefinitionT][]; type: "exponential" }
| { stops: [number, ProjectionDefinitionT][]; type: "interval" }
)[],
]
| [
"interpolate-hcl",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"interpolate-lab",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"step",
number
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| [
"let",
string,
ExpressionSpecification
| ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| VariableExpressionSpecification
| ["concat", ...(ExpressionSpecification | ExpressionInputType)[]]
| ["downcase", string | ExpressionSpecification]
| ["is-supported-script", string | ExpressionSpecification]
| [
"join",
ExpressionSpecification
| string[],
string | ExpressionSpecification,
]
| ["resolved-locale", CollatorExpressionSpecification]
| [
"split",
string
| ExpressionSpecification,
string | ExpressionSpecification,
]
| ["upcase", string | ExpressionSpecification]
| [
"rgb",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"rgba",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| ["to-rgba", string | ExpressionSpecification]
| [
"-",
number
| ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| [
"*",
number
| ExpressionSpecification,
number | ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"/",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"%",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"^",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| ["+", ...(number | ExpressionSpecification)[]]
| ["abs", number | ExpressionSpecification]
| ["acos", number | ExpressionSpecification]
| ["asin", number | ExpressionSpecification]
| ["atan", number | ExpressionSpecification]
| ["ceil", number | ExpressionSpecification]
| ["cos", number | ExpressionSpecification]
| ["distance", GeoJSON<Geometry, GeoJsonProperties>]
| ["e"]
| ["floor", number | ExpressionSpecification]
| ["ln", number | ExpressionSpecification]
| ["ln2"]
| ["log10", number | ExpressionSpecification]
| ["log2", number | ExpressionSpecification]
| [
"max",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"min",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| ["pi"]
| ["round", number | ExpressionSpecification]
| ["sin", number | ExpressionSpecification]
| ["sqrt", number | ExpressionSpecification]
| ["tan", number | ExpressionSpecification]
| ["zoom"]
| ["heatmap-density"]
| ["elevation"]
| string[]
| number[]
| { stops: [number, boolean][]; type: "exponential" }
| { stops: [number, boolean][]; type: "interval" }
| { stops: [number, number][]; type: "exponential" }
| { stops: [number, number][]; type: "interval" }
| {
default?: number;
property: string;
stops: [number, number][];
type: "exponential";
}
| {
default?: number;
property: string;
stops: [number, number][];
type: "interval";
}
| {
default?: number;
property: string;
stops: [string | number | boolean, number][];
type: "categorical";
}
| { default?: number; property: string; type: "identity" }
| {
default?: number;
property: string;
stops: [{ value: number; zoom: number }, number][];
type: "exponential";
}
| {
default?: number;
property: string;
stops: [{ value: number; zoom: number }, number][];
type: "interval";
}
| {
default?: number;
property: string;
stops: [{ value: string | number | boolean; zoom: number }, number][];
type: "categorical";
}
| { stops: [number, string][]; type: "exponential" }
| { stops: [number, string][]; type: "interval" }
| {
default?: string;
property: string;
stops: [number, string][];
type: "exponential";
}
| {
default?: string;
property: string;
stops: [number, string][];
type: "interval";
}
| {
default?: string;
property: string;
stops: [string | number | boolean, string][];
type: "categorical";
}
| { default?: string; property: string; type: "identity" }
| {
default?: string;
property: string;
stops: [{ value: number; zoom: number }, string][];
type: "exponential";
}
| {
default?: string;
property: string;
stops: [{ value: number; zoom: number }, string][];
type: "interval";
}
| {
default?: string;
property: string;
stops: [{ value: string | number | boolean; zoom: number }, string][];
type: "categorical";
}
| [number, number]
| { stops: [number, [number, number]][]; type: "exponential" }
| { stops: [number, [number, number]][]; type: "interval" }
| { stops: [number, "round" | "butt" | "square"][]; type: "exponential" }
| { stops: [number, "round" | "butt" | "square"][]; type: "interval" }
| {
default?: "round" | "butt" | "square";
property: string;
stops: [number, "round" | "butt" | "square"][];
type: "exponential";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
stops: [number, "round" | "butt" | "square"][];
type: "interval";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
stops: [string | number | boolean, "round" | "butt" | "square"][];
type: "categorical";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
type: "identity";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
stops: [{ value: number; zoom: number }, "round" | "butt" | "square"][];
type: "exponential";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
stops: [{ value: number; zoom: number }, "round" | "butt" | "square"][];
type: "interval";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
"round" | "butt" | "square",
][];
type: "categorical";
}
| { stops: [number, "round" | "bevel" | "miter"][]; type: "exponential" }
| { stops: [number, "round" | "bevel" | "miter"][]; type: "interval" }
| {
default?: "round" | "bevel" | "miter";
property: string;
stops: [number, "round" | "bevel" | "miter"][];
type: "exponential";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
stops: [number, "round" | "bevel" | "miter"][];
type: "interval";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
stops: [string | number | boolean, "round" | "bevel" | "miter"][];
type: "categorical";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
type: "identity";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
stops: [{ value: number; zoom: number }, "round" | "bevel" | "miter"][];
type: "exponential";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
stops: [{ value: number; zoom: number }, "round" | "bevel" | "miter"][];
type: "interval";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
"round" | "bevel" | "miter",
][];
type: "categorical";
}
| {
stops: [number, "point" | "line" | "line-center"][];
type: "exponential";
}
| {
stops: [number, "point" | "line" | "line-center"][];
type: "interval";
}
| {
stops: [number, "source" | "auto" | "viewport-y"][];
type: "exponential";
}
| {
stops: [number, "source" | "auto" | "viewport-y"][];
type: "interval";
}
| {
stops: [number, "never" | "always" | "cooperative"][];
type: "exponential";
}
| {
stops: [number, "never" | "always" | "cooperative"][];
type: "interval";
}
| { stops: [number, "map" | "viewport" | "auto"][]; type: "exponential" }
| { stops: [number, "map" | "viewport" | "auto"][]; type: "interval" }
| {
default?: "map" | "viewport" | "auto";
property: string;
stops: [number, "map" | "viewport" | "auto"][];
type: "exponential";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
stops: [number, "map" | "viewport" | "auto"][];
type: "interval";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
stops: [string | number | boolean, "map" | "viewport" | "auto"][];
type: "categorical";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
type: "identity";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
stops: [{ value: number; zoom: number }, "map" | "viewport" | "auto"][];
type: "exponential";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
stops: [{ value: number; zoom: number }, "map" | "viewport" | "auto"][];
type: "interval";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
"map" | "viewport" | "auto",
][];
type: "categorical";
}
| {
stops: [number, "none" | "width" | "height" | "both"][];
type: "exponential";
}
| {
stops: [number, "none" | "width" | "height" | "both"][];
type: "interval";
}
| [number, number, number, number]
| {
stops: [number, [number, number, number, number]][];
type: "exponential";
}
| {
stops: [number, [number, number, number, number]][];
type: "interval";
}
| { stops: [number, PaddingSpecification][]; type: "exponential" }
| { stops: [number, PaddingSpecification][]; type: "interval" }
| {
default?: PaddingSpecification;
property: string;
stops: [number, PaddingSpecification][];
type: "exponential";
}
| {
default?: PaddingSpecification;
property: string;
stops: [number, PaddingSpecification][];
type: "interval";
}
| {
default?: PaddingSpecification;
property: string;
stops: [string | number | boolean, PaddingSpecification][];
type: "categorical";
}
| { default?: PaddingSpecification; property: string; type: "identity" }
| {
default?: PaddingSpecification;
property: string;
stops: [{ value: number; zoom: number }, PaddingSpecification][];
type: "exponential";
}
| {
default?: PaddingSpecification;
property: string;
stops: [{ value: number; zoom: number }, PaddingSpecification][];
type: "interval";
}
| {
default?: PaddingSpecification;
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
PaddingSpecification,
][];
type: "categorical";
}
| {
default?: [number, number];
property: string;
stops: [number, [number, number]][];
type: "exponential";
}
| {
default?: [number, number];
property: string;
stops: [number, [number, number]][];
type: "interval";
}
| {
default?: [number, number];
property: string;
stops: [string | number | boolean, [number, number]][];
type: "categorical";
}
| { default?: [number, number]; property: string; type: "identity" }
| {
default?: [number, number];
property: string;
stops: [{ value: number; zoom: number }, [number, number]][];
type: "exponential";
}
| {
default?: [number, number];
property: string;
stops: [{ value: number; zoom: number }, [number, number]][];
type: "interval";
}
| {
default?: [number, number];
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
[number, number],
][];
type: "categorical";
}
| {
stops: [
number,
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "exponential";
}
| {
stops: [
number,
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "interval";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
number,
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "exponential";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
number,
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "interval";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
string
| number
| boolean,
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "categorical";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
type: "identity";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
{ value: number; zoom: number },
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "exponential";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
{ value: number; zoom: number },
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "interval";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "categorical";
}
| {
stops: [number, "map" | "viewport" | "auto" | "viewport-glyph"][];
type: "exponential";
}
| {
stops: [number, "map" | "viewport" | "auto" | "viewport-glyph"][];
type: "interval";
}
| { stops: [number, string[]][]; type: "exponential" }
| { stops: [number, string[]][]; type: "interval" }
| {
default?: string[];
property: string;
stops: [number, string[]][];
type: "exponential";
}
| {
default?: string[];
property: string;
stops: [number, string[]][];
type: "interval";
}
| {
default?: string[];
property: string;
stops: [string | number | boolean, string[]][];
type: "categorical";
}
| { default?: string[]; property: string; type: "identity" }
| {
default?: string[];
property: string;
stops: [{ value: number; zoom: number }, string[]][];
type: "exponential";
}
| {
default?: string[];
property: string;
stops: [{ value: number; zoom: number }, string[]][];
type: "interval";
}
| {
default?: string[];
property: string;
stops: [{ value: string | number | boolean; zoom: number }, string[]][];
type: "categorical";
}
| {
stops: [number, "center" | "auto" | "left" | "right"][];
type: "exponential";
}
| {
stops: [number, "center" | "auto" | "left" | "right"][];
type: "interval";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [number, "center" | "auto" | "left" | "right"][];
type: "exponential";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [number, "center" | "auto" | "left" | "right"][];
type: "interval";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [string | number | boolean, "center" | "auto" | "left" | "right"][];
type: "categorical";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
type: "identity";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [
{ value: number; zoom: number },
"center" | "auto" | "left" | "right",
][];
type: "exponential";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [
{ value: number; zoom: number },
"center" | "auto" | "left" | "right",
][];
type: "interval";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
"center" | "auto" | "left" | "right",
][];
type: "categorical";
}
| (
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right"
)[]
| {
stops: [
number,
(
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right"
)[],
][];
type: "exponential";
}
| {
stops: [
number,
(
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right"
)[],
][];
type: "interval";
}
| VariableAnchorOffsetCollectionSpecification
| {
stops: [number, VariableAnchorOffsetCollectionSpecification][];
type: "exponential";
}
| {
stops: [number, VariableAnchorOffsetCollectionSpecification][];
type: "interval";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [number, VariableAnchorOffsetCollectionSpecification][];
type: "exponential";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [number, VariableAnchorOffsetCollectionSpecification][];
type: "interval";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [
string
| number
| boolean,
VariableAnchorOffsetCollectionSpecification,
][];
type: "categorical";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
type: "identity";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [
{ value: number; zoom: number },
VariableAnchorOffsetCollectionSpecification,
][];
type: "exponential";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [
{ value: number; zoom: number },
VariableAnchorOffsetCollectionSpecification,
][];
type: "interval";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
VariableAnchorOffsetCollectionSpecification,
][];
type: "categorical";
}
| ("horizontal" | "vertical")[]
| {
stops: [number, ("horizontal" | "vertical")[]][];
type: "exponential";
}
| { stops: [number, ("horizontal" | "vertical")[]][]; type: "interval" }
| {
stops: [number, "none" | "uppercase" | "lowercase"][];
type: "exponential";
}
| {
stops: [number, "none" | "uppercase" | "lowercase"][];
type: "interval";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [number, "none" | "uppercase" | "lowercase"][];
type: "exponential";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [number, "none" | "uppercase" | "lowercase"][];
type: "interval";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [string | number | boolean, "none" | "uppercase" | "lowercase"][];
type: "categorical";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
type: "identity";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [
{ value: number; zoom: number },
"none" | "uppercase" | "lowercase",
][];
type: "exponential";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [
{ value: number; zoom: number },
"none" | "uppercase" | "lowercase",
][];
type: "interval";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
"none" | "uppercase" | "lowercase",
][];
type: "categorical";
}
| { stops: [number, "ground" | "absolute"][]; type: "exponential" }
| { stops: [number, "ground" | "absolute"][]; type: "interval" }
| undefined,
];
command: "setLayoutProperty";
}
| { args: [string, FilterSpecification]; command: "setFilter" }
| { args: [string, SourceSpecification]; command: "addSource" }
| { args: [string]; command: "removeSource" }
| {
args: [string, string | GeoJSON<Geometry, GeoJsonProperties>];
command: "setGeoJSONSourceData";
}
| { args: [string, number, number]; command: "setLayerZoomRange" }
| { args: [string, string, unknown]; command: "setLayerProperty" }
| { args: [number[]]; command: "setCenter" }
| { args: [number]; command: "setCenterAltitude" }
| { args: [number]; command: "setZoom" }
| { args: [number]; command: "setBearing" }
| { args: [number]; command: "setPitch" }
| { args: [number]; command: "setRoll" }
| { args: [SpriteSpecification]; command: "setSprite" }
| { args: [string]; command: "setGlyphs" }
| { args: [FontFacesSpecification]; command: "setFontFaces" }
| { args: [TransitionSpecification]; command: "setTransition" }
| { args: [LightSpecification]; command: "setLight" }
| { args: [TerrainSpecification]; command: "setTerrain" }
| { args: [SkySpecification]; command: "setSky" }
| { args: [ProjectionSpecification]; command: "setProjection" }
| { args: [StateSpecification]; command: "setGlobalState" }
)[]Parameters
Optionalbefore: StyleSpecificationstylesheet to compare from
- after: StyleSpecification
stylesheet to compare to
Returns (
| { args: [StyleSpecification]; command: "setStyle" }
| { args: [LayerSpecification, string | undefined]; command: "addLayer" }
| { args: [string]; command: "removeLayer" }
| {
args: [
string,
keyof AllPaintProperties,
| string
| number
| boolean
| ["array", ExpressionSpecification]
| ["array", "string" | "number" | "boolean", ExpressionSpecification]
| [
"array",
"string"
| "number"
| "boolean",
number,
ExpressionSpecification,
]
| ["boolean", unknown, ...unknown[]]
| CollatorExpressionSpecification
| [
"format",
...(
| string
| ExpressionSpecification
| ["image", ExpressionSpecification]
| {
"font-scale"?: number | ExpressionSpecification | undefined;
"text-color"?: string | ExpressionSpecification | undefined;
"text-font"?: ExpressionSpecification | undefined;
"vertical-align"?: "bottom" | "center" | "top";
}
)[],
]
| ["image", string | ExpressionSpecification]
| ["literal", unknown]
| ["semiliteral", unknown]
| ["number", unknown, ...unknown[]]
| [
"number-format",
number
| ExpressionSpecification,
{
currency?: string | ExpressionSpecification;
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
},
]
| [
"number-format",
number
| ExpressionSpecification,
{
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
unit?: string | ExpressionSpecification;
},
]
| ["object", unknown, ...unknown[]]
| ["string", unknown, ...unknown[]]
| ["to-boolean", unknown]
| ["to-color", unknown, ...unknown[]]
| ["to-number", unknown, ...unknown[]]
| ["to-string", unknown]
| ["typeof", unknown]
| ["accumulated"]
| ["feature-state", string | ExpressionSpecification]
| ["geometry-type"]
| ["id"]
| ["line-progress"]
| ["properties"]
| ["at", number | ExpressionSpecification, ExpressionSpecification]
| ["get", string | ExpressionSpecification, ExpressionSpecification?]
| ["global-state", string]
| ["has", string | ExpressionSpecification, ExpressionSpecification?]
| [
"in",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
]
| [
"index-of",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["length", string | ExpressionSpecification]
| [
"slice",
string
| ExpressionSpecification,
number | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["!", boolean | ExpressionSpecification]
| [
"!=",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"==",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| ["all", ...(boolean | ExpressionSpecification)[]]
| ["any", ...(boolean | ExpressionSpecification)[]]
| [
"case",
boolean
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType | null,
...(ExpressionSpecification | ExpressionInputType | null)[],
ExpressionSpecification | ExpressionInputType | null,
]
| ["coalesce", ...(ExpressionSpecification | ExpressionInputType)[]]
| [
"match",
string
| number
| ExpressionSpecification,
string | number | string[] | number[],
ExpressionSpecification | ExpressionInputType | null,
...(
| ExpressionSpecification
| string[]
| ExpressionInputType
| number[]
| null
)[],
ExpressionSpecification
| ExpressionInputType
| null,
]
| ["within", GeoJSON<Geometry, GeoJsonProperties>]
| [
"interpolate",
InterpolationSpecification,
number
| ExpressionSpecification,
...(
| string
| number
| ["array", ExpressionSpecification]
| ["array", "string" | "number" | "boolean", ExpressionSpecification]
| [
"array",
"string"
| "number"
| "boolean",
number,
ExpressionSpecification,
]
| ["boolean", unknown, ...unknown[]]
| CollatorExpressionSpecification
| [
"format",
...(
| string
| ExpressionSpecification
| ["image", ExpressionSpecification]
| {
"font-scale"?: number | ExpressionSpecification | undefined;
"text-color"?: string | ExpressionSpecification | undefined;
"text-font"?: ExpressionSpecification | undefined;
"vertical-align"?: (...) | (...) | (...) | (...);
}
)[],
]
| ["image", string | ExpressionSpecification]
| ["literal", unknown]
| ["semiliteral", unknown]
| ["number", unknown, ...unknown[]]
| [
"number-format",
number
| ExpressionSpecification,
{
currency?: string | ExpressionSpecification;
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
},
]
| [
"number-format",
number
| ExpressionSpecification,
{
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
unit?: string | ExpressionSpecification;
},
]
| ["object", unknown, ...unknown[]]
| ["string", unknown, ...unknown[]]
| ["to-boolean", unknown]
| ["to-color", unknown, ...unknown[]]
| ["to-number", unknown, ...unknown[]]
| ["to-string", unknown]
| ["typeof", unknown]
| ["accumulated"]
| ["feature-state", string | ExpressionSpecification]
| ["geometry-type"]
| ["id"]
| ["line-progress"]
| ["properties"]
| ["at", number | ExpressionSpecification, ExpressionSpecification]
| ["get", string | ExpressionSpecification, ExpressionSpecification?]
| ["global-state", string]
| ["has", string | ExpressionSpecification, ExpressionSpecification?]
| [
"in",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
]
| [
"index-of",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["length", string | ExpressionSpecification]
| [
"slice",
string
| ExpressionSpecification,
number | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["!", boolean | ExpressionSpecification]
| [
"!=",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"==",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| ["all", ...(boolean | ExpressionSpecification)[]]
| ["any", ...(boolean | ExpressionSpecification)[]]
| [
"case",
boolean
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType | null,
...(ExpressionSpecification | ExpressionInputType | null)[],
ExpressionSpecification | ExpressionInputType | null,
]
| ["coalesce", ...(ExpressionSpecification | ExpressionInputType)[]]
| [
"match",
string
| number
| ExpressionSpecification,
string | number | string[] | number[],
ExpressionSpecification | ExpressionInputType | null,
...(
| ExpressionSpecification
| string[]
| ExpressionInputType
| number[]
| null
)[],
ExpressionSpecification
| ExpressionInputType
| null,
]
| ["within", GeoJSON<Geometry, GeoJsonProperties>]
| (
["interpolate", InterpolationSpecification, number | ExpressionSpecification, ...(string | number | ["array", ExpressionSpecification] | ... 92 more ... | { ...; })[]]
)
| [
"interpolate-hcl",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"interpolate-lab",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"step",
number
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| [
"let",
string,
ExpressionSpecification
| ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| VariableExpressionSpecification
| ["concat", ...(ExpressionSpecification | ExpressionInputType)[]]
| ["downcase", string | ExpressionSpecification]
| ["is-supported-script", string | ExpressionSpecification]
| [
"join",
ExpressionSpecification
| string[],
string | ExpressionSpecification,
]
| ["resolved-locale", CollatorExpressionSpecification]
| [
"split",
string
| ExpressionSpecification,
string | ExpressionSpecification,
]
| ["upcase", string | ExpressionSpecification]
| [
"rgb",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"rgba",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| ["to-rgba", string | ExpressionSpecification]
| [
"-",
number
| ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| [
"*",
number
| ExpressionSpecification,
number | ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"/",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"%",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"^",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| ["+", ...(number | ExpressionSpecification)[]]
| ["abs", number | ExpressionSpecification]
| ["acos", number | ExpressionSpecification]
| ["asin", number | ExpressionSpecification]
| ["atan", number | ExpressionSpecification]
| ["ceil", number | ExpressionSpecification]
| ["cos", number | ExpressionSpecification]
| ["distance", GeoJSON<Geometry, GeoJsonProperties>]
| ["e"]
| ["floor", number | ExpressionSpecification]
| ["ln", number | ExpressionSpecification]
| ["ln2"]
| ["log10", number | ExpressionSpecification]
| ["log2", number | ExpressionSpecification]
| [
"max",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"min",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| ["pi"]
| ["round", number | ExpressionSpecification]
| ["sin", number | ExpressionSpecification]
| ["sqrt", number | ExpressionSpecification]
| ["tan", number | ExpressionSpecification]
| ["zoom"]
| ["heatmap-density"]
| ["elevation"]
| ProjectionDefinitionT
| { stops: [number, ProjectionDefinitionT][]; type: "exponential" }
| { stops: [number, ProjectionDefinitionT][]; type: "interval" }
)[],
]
| [
"interpolate-hcl",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"interpolate-lab",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"step",
number
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| [
"let",
string,
ExpressionSpecification
| ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| VariableExpressionSpecification
| ["concat", ...(ExpressionSpecification | ExpressionInputType)[]]
| ["downcase", string | ExpressionSpecification]
| ["is-supported-script", string | ExpressionSpecification]
| [
"join",
ExpressionSpecification
| string[],
string | ExpressionSpecification,
]
| ["resolved-locale", CollatorExpressionSpecification]
| [
"split",
string
| ExpressionSpecification,
string | ExpressionSpecification,
]
| ["upcase", string | ExpressionSpecification]
| [
"rgb",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"rgba",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| ["to-rgba", string | ExpressionSpecification]
| [
"-",
number
| ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| [
"*",
number
| ExpressionSpecification,
number | ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"/",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"%",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"^",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| ["+", ...(number | ExpressionSpecification)[]]
| ["abs", number | ExpressionSpecification]
| ["acos", number | ExpressionSpecification]
| ["asin", number | ExpressionSpecification]
| ["atan", number | ExpressionSpecification]
| ["ceil", number | ExpressionSpecification]
| ["cos", number | ExpressionSpecification]
| ["distance", GeoJSON<Geometry, GeoJsonProperties>]
| ["e"]
| ["floor", number | ExpressionSpecification]
| ["ln", number | ExpressionSpecification]
| ["ln2"]
| ["log10", number | ExpressionSpecification]
| ["log2", number | ExpressionSpecification]
| [
"max",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"min",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| ["pi"]
| ["round", number | ExpressionSpecification]
| ["sin", number | ExpressionSpecification]
| ["sqrt", number | ExpressionSpecification]
| ["tan", number | ExpressionSpecification]
| ["zoom"]
| ["heatmap-density"]
| ["elevation"]
| string[]
| number[]
| { stops: [number, boolean][]; type: "exponential" }
| { stops: [number, boolean][]; type: "interval" }
| { stops: [number, number][]; type: "exponential" }
| { stops: [number, number][]; type: "interval" }
| {
default?: number;
property: string;
stops: [number, number][];
type: "exponential";
}
| {
default?: number;
property: string;
stops: [number, number][];
type: "interval";
}
| {
default?: number;
property: string;
stops: [string | number | boolean, number][];
type: "categorical";
}
| { default?: number; property: string; type: "identity" }
| {
default?: number;
property: string;
stops: [{ value: number; zoom: number }, number][];
type: "exponential";
}
| {
default?: number;
property: string;
stops: [{ value: number; zoom: number }, number][];
type: "interval";
}
| {
default?: number;
property: string;
stops: [{ value: string | number | boolean; zoom: number }, number][];
type: "categorical";
}
| TransitionSpecification
| { stops: [number, string][]; type: "exponential" }
| { stops: [number, string][]; type: "interval" }
| {
default?: string;
property: string;
stops: [number, string][];
type: "exponential";
}
| {
default?: string;
property: string;
stops: [number, string][];
type: "interval";
}
| {
default?: string;
property: string;
stops: [string | number | boolean, string][];
type: "categorical";
}
| { default?: string; property: string; type: "identity" }
| {
default?: string;
property: string;
stops: [{ value: number; zoom: number }, string][];
type: "exponential";
}
| {
default?: string;
property: string;
stops: [{ value: number; zoom: number }, string][];
type: "interval";
}
| {
default?: string;
property: string;
stops: [{ value: string | number | boolean; zoom: number }, string][];
type: "categorical";
}
| [number, number]
| { stops: [number, [number, number]][]; type: "exponential" }
| { stops: [number, [number, number]][]; type: "interval" }
| { stops: [number, "map" | "viewport"][]; type: "exponential" }
| { stops: [number, "map" | "viewport"][]; type: "interval" }
| { stops: [number, number[]][]; type: "exponential" }
| { stops: [number, number[]][]; type: "interval" }
| {
default?: number[];
property: string;
stops: [number, number[]][];
type: "exponential";
}
| {
default?: number[];
property: string;
stops: [number, number[]][];
type: "interval";
}
| {
default?: number[];
property: string;
stops: [string | number | boolean, number[]][];
type: "categorical";
}
| { default?: number[]; property: string; type: "identity" }
| {
default?: number[];
property: string;
stops: [{ value: number; zoom: number }, number[]][];
type: "exponential";
}
| {
default?: number[];
property: string;
stops: [{ value: number; zoom: number }, number[]][];
type: "interval";
}
| {
default?: number[];
property: string;
stops: [{ value: string | number | boolean; zoom: number }, number[]][];
type: "categorical";
}
| { stops: [number, "linear" | "nearest"][]; type: "exponential" }
| { stops: [number, "linear" | "nearest"][]; type: "interval" }
| { stops: [number, NumberArraySpecification][]; type: "exponential" }
| { stops: [number, NumberArraySpecification][]; type: "interval" }
| { stops: [number, ColorArraySpecification][]; type: "exponential" }
| { stops: [number, ColorArraySpecification][]; type: "interval" }
| {
stops: [
number,
"standard"
| "basic"
| "combined"
| "igor"
| "multidirectional",
][];
type: "exponential";
}
| {
stops: [
number,
"standard"
| "basic"
| "combined"
| "igor"
| "multidirectional",
][];
type: "interval";
}
| undefined,
];
command: "setPaintProperty";
}
| {
args: [
string,
keyof AllLayoutProperties,
| string
| number
| boolean
| ["array", ExpressionSpecification]
| ["array", "string" | "number" | "boolean", ExpressionSpecification]
| [
"array",
"string"
| "number"
| "boolean",
number,
ExpressionSpecification,
]
| ["boolean", unknown, ...unknown[]]
| CollatorExpressionSpecification
| [
"format",
...(
| string
| ExpressionSpecification
| ["image", ExpressionSpecification]
| {
"font-scale"?: number | ExpressionSpecification | undefined;
"text-color"?: string | ExpressionSpecification | undefined;
"text-font"?: ExpressionSpecification | undefined;
"vertical-align"?: "bottom" | "center" | "top";
}
)[],
]
| ["image", string | ExpressionSpecification]
| ["literal", unknown]
| ["semiliteral", unknown]
| ["number", unknown, ...unknown[]]
| [
"number-format",
number
| ExpressionSpecification,
{
currency?: string | ExpressionSpecification;
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
},
]
| [
"number-format",
number
| ExpressionSpecification,
{
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
unit?: string | ExpressionSpecification;
},
]
| ["object", unknown, ...unknown[]]
| ["string", unknown, ...unknown[]]
| ["to-boolean", unknown]
| ["to-color", unknown, ...unknown[]]
| ["to-number", unknown, ...unknown[]]
| ["to-string", unknown]
| ["typeof", unknown]
| ["accumulated"]
| ["feature-state", string | ExpressionSpecification]
| ["geometry-type"]
| ["id"]
| ["line-progress"]
| ["properties"]
| ["at", number | ExpressionSpecification, ExpressionSpecification]
| ["get", string | ExpressionSpecification, ExpressionSpecification?]
| ["global-state", string]
| ["has", string | ExpressionSpecification, ExpressionSpecification?]
| [
"in",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
]
| [
"index-of",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["length", string | ExpressionSpecification]
| [
"slice",
string
| ExpressionSpecification,
number | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["!", boolean | ExpressionSpecification]
| [
"!=",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"==",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| ["all", ...(boolean | ExpressionSpecification)[]]
| ["any", ...(boolean | ExpressionSpecification)[]]
| [
"case",
boolean
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType | null,
...(ExpressionSpecification | ExpressionInputType | null)[],
ExpressionSpecification | ExpressionInputType | null,
]
| ["coalesce", ...(ExpressionSpecification | ExpressionInputType)[]]
| [
"match",
string
| number
| ExpressionSpecification,
string | number | string[] | number[],
ExpressionSpecification | ExpressionInputType | null,
...(
| ExpressionSpecification
| string[]
| ExpressionInputType
| number[]
| null
)[],
ExpressionSpecification
| ExpressionInputType
| null,
]
| ["within", GeoJSON<Geometry, GeoJsonProperties>]
| [
"interpolate",
InterpolationSpecification,
number
| ExpressionSpecification,
...(
| string
| number
| ["array", ExpressionSpecification]
| ["array", "string" | "number" | "boolean", ExpressionSpecification]
| [
"array",
"string"
| "number"
| "boolean",
number,
ExpressionSpecification,
]
| ["boolean", unknown, ...unknown[]]
| CollatorExpressionSpecification
| [
"format",
...(
| string
| ExpressionSpecification
| ["image", ExpressionSpecification]
| {
"font-scale"?: number | ExpressionSpecification | undefined;
"text-color"?: string | ExpressionSpecification | undefined;
"text-font"?: ExpressionSpecification | undefined;
"vertical-align"?: (...) | (...) | (...) | (...);
}
)[],
]
| ["image", string | ExpressionSpecification]
| ["literal", unknown]
| ["semiliteral", unknown]
| ["number", unknown, ...unknown[]]
| [
"number-format",
number
| ExpressionSpecification,
{
currency?: string | ExpressionSpecification;
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
},
]
| [
"number-format",
number
| ExpressionSpecification,
{
locale?: string | ExpressionSpecification;
"max-fraction-digits"?: number | ExpressionSpecification;
"min-fraction-digits"?: number | ExpressionSpecification;
unit?: string | ExpressionSpecification;
},
]
| ["object", unknown, ...unknown[]]
| ["string", unknown, ...unknown[]]
| ["to-boolean", unknown]
| ["to-color", unknown, ...unknown[]]
| ["to-number", unknown, ...unknown[]]
| ["to-string", unknown]
| ["typeof", unknown]
| ["accumulated"]
| ["feature-state", string | ExpressionSpecification]
| ["geometry-type"]
| ["id"]
| ["line-progress"]
| ["properties"]
| ["at", number | ExpressionSpecification, ExpressionSpecification]
| ["get", string | ExpressionSpecification, ExpressionSpecification?]
| ["global-state", string]
| ["has", string | ExpressionSpecification, ExpressionSpecification?]
| [
"in",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
]
| [
"index-of",
ExpressionSpecification
| ExpressionInputType
| null,
string | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["length", string | ExpressionSpecification]
| [
"slice",
string
| ExpressionSpecification,
number | ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| ["!", boolean | ExpressionSpecification]
| [
"!=",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"<=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
"==",
ExpressionSpecification
| ExpressionInputType
| null,
ExpressionSpecification | ExpressionInputType | null,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| [
">=",
string
| number
| ExpressionSpecification,
string | number | ExpressionSpecification,
(CollatorExpressionSpecification | VariableExpressionSpecification)?,
]
| ["all", ...(boolean | ExpressionSpecification)[]]
| ["any", ...(boolean | ExpressionSpecification)[]]
| [
"case",
boolean
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType | null,
...(ExpressionSpecification | ExpressionInputType | null)[],
ExpressionSpecification | ExpressionInputType | null,
]
| ["coalesce", ...(ExpressionSpecification | ExpressionInputType)[]]
| [
"match",
string
| number
| ExpressionSpecification,
string | number | string[] | number[],
ExpressionSpecification | ExpressionInputType | null,
...(
| ExpressionSpecification
| string[]
| ExpressionInputType
| number[]
| null
)[],
ExpressionSpecification
| ExpressionInputType
| null,
]
| ["within", GeoJSON<Geometry, GeoJsonProperties>]
| (
["interpolate", InterpolationSpecification, number | ExpressionSpecification, ...(string | number | ["array", ExpressionSpecification] | ... 92 more ... | { ...; })[]]
)
| [
"interpolate-hcl",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"interpolate-lab",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"step",
number
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| [
"let",
string,
ExpressionSpecification
| ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| VariableExpressionSpecification
| ["concat", ...(ExpressionSpecification | ExpressionInputType)[]]
| ["downcase", string | ExpressionSpecification]
| ["is-supported-script", string | ExpressionSpecification]
| [
"join",
ExpressionSpecification
| string[],
string | ExpressionSpecification,
]
| ["resolved-locale", CollatorExpressionSpecification]
| [
"split",
string
| ExpressionSpecification,
string | ExpressionSpecification,
]
| ["upcase", string | ExpressionSpecification]
| [
"rgb",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"rgba",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| ["to-rgba", string | ExpressionSpecification]
| [
"-",
number
| ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| [
"*",
number
| ExpressionSpecification,
number | ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"/",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"%",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"^",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| ["+", ...(number | ExpressionSpecification)[]]
| ["abs", number | ExpressionSpecification]
| ["acos", number | ExpressionSpecification]
| ["asin", number | ExpressionSpecification]
| ["atan", number | ExpressionSpecification]
| ["ceil", number | ExpressionSpecification]
| ["cos", number | ExpressionSpecification]
| ["distance", GeoJSON<Geometry, GeoJsonProperties>]
| ["e"]
| ["floor", number | ExpressionSpecification]
| ["ln", number | ExpressionSpecification]
| ["ln2"]
| ["log10", number | ExpressionSpecification]
| ["log2", number | ExpressionSpecification]
| [
"max",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"min",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| ["pi"]
| ["round", number | ExpressionSpecification]
| ["sin", number | ExpressionSpecification]
| ["sqrt", number | ExpressionSpecification]
| ["tan", number | ExpressionSpecification]
| ["zoom"]
| ["heatmap-density"]
| ["elevation"]
| ProjectionDefinitionT
| { stops: [number, ProjectionDefinitionT][]; type: "exponential" }
| { stops: [number, ProjectionDefinitionT][]; type: "interval" }
)[],
]
| [
"interpolate-hcl",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"interpolate-lab",
InterpolationSpecification,
number
| ExpressionSpecification,
...(string | number | ExpressionSpecification)[],
]
| [
"step",
number
| ExpressionSpecification,
ExpressionSpecification | ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| [
"let",
string,
ExpressionSpecification
| ExpressionInputType,
...(ExpressionSpecification | ExpressionInputType)[],
]
| VariableExpressionSpecification
| ["concat", ...(ExpressionSpecification | ExpressionInputType)[]]
| ["downcase", string | ExpressionSpecification]
| ["is-supported-script", string | ExpressionSpecification]
| [
"join",
ExpressionSpecification
| string[],
string | ExpressionSpecification,
]
| ["resolved-locale", CollatorExpressionSpecification]
| [
"split",
string
| ExpressionSpecification,
string | ExpressionSpecification,
]
| ["upcase", string | ExpressionSpecification]
| [
"rgb",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"rgba",
number
| ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
number | ExpressionSpecification,
]
| ["to-rgba", string | ExpressionSpecification]
| [
"-",
number
| ExpressionSpecification,
(number | ExpressionSpecification)?,
]
| [
"*",
number
| ExpressionSpecification,
number | ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"/",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"%",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| [
"^",
number
| ExpressionSpecification,
number | ExpressionSpecification,
]
| ["+", ...(number | ExpressionSpecification)[]]
| ["abs", number | ExpressionSpecification]
| ["acos", number | ExpressionSpecification]
| ["asin", number | ExpressionSpecification]
| ["atan", number | ExpressionSpecification]
| ["ceil", number | ExpressionSpecification]
| ["cos", number | ExpressionSpecification]
| ["distance", GeoJSON<Geometry, GeoJsonProperties>]
| ["e"]
| ["floor", number | ExpressionSpecification]
| ["ln", number | ExpressionSpecification]
| ["ln2"]
| ["log10", number | ExpressionSpecification]
| ["log2", number | ExpressionSpecification]
| [
"max",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| [
"min",
number
| ExpressionSpecification,
...(number | ExpressionSpecification)[],
]
| ["pi"]
| ["round", number | ExpressionSpecification]
| ["sin", number | ExpressionSpecification]
| ["sqrt", number | ExpressionSpecification]
| ["tan", number | ExpressionSpecification]
| ["zoom"]
| ["heatmap-density"]
| ["elevation"]
| string[]
| number[]
| { stops: [number, boolean][]; type: "exponential" }
| { stops: [number, boolean][]; type: "interval" }
| { stops: [number, number][]; type: "exponential" }
| { stops: [number, number][]; type: "interval" }
| {
default?: number;
property: string;
stops: [number, number][];
type: "exponential";
}
| {
default?: number;
property: string;
stops: [number, number][];
type: "interval";
}
| {
default?: number;
property: string;
stops: [string | number | boolean, number][];
type: "categorical";
}
| { default?: number; property: string; type: "identity" }
| {
default?: number;
property: string;
stops: [{ value: number; zoom: number }, number][];
type: "exponential";
}
| {
default?: number;
property: string;
stops: [{ value: number; zoom: number }, number][];
type: "interval";
}
| {
default?: number;
property: string;
stops: [{ value: string | number | boolean; zoom: number }, number][];
type: "categorical";
}
| { stops: [number, string][]; type: "exponential" }
| { stops: [number, string][]; type: "interval" }
| {
default?: string;
property: string;
stops: [number, string][];
type: "exponential";
}
| {
default?: string;
property: string;
stops: [number, string][];
type: "interval";
}
| {
default?: string;
property: string;
stops: [string | number | boolean, string][];
type: "categorical";
}
| { default?: string; property: string; type: "identity" }
| {
default?: string;
property: string;
stops: [{ value: number; zoom: number }, string][];
type: "exponential";
}
| {
default?: string;
property: string;
stops: [{ value: number; zoom: number }, string][];
type: "interval";
}
| {
default?: string;
property: string;
stops: [{ value: string | number | boolean; zoom: number }, string][];
type: "categorical";
}
| [number, number]
| { stops: [number, [number, number]][]; type: "exponential" }
| { stops: [number, [number, number]][]; type: "interval" }
| { stops: [number, "round" | "butt" | "square"][]; type: "exponential" }
| { stops: [number, "round" | "butt" | "square"][]; type: "interval" }
| {
default?: "round" | "butt" | "square";
property: string;
stops: [number, "round" | "butt" | "square"][];
type: "exponential";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
stops: [number, "round" | "butt" | "square"][];
type: "interval";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
stops: [string | number | boolean, "round" | "butt" | "square"][];
type: "categorical";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
type: "identity";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
stops: [{ value: number; zoom: number }, "round" | "butt" | "square"][];
type: "exponential";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
stops: [{ value: number; zoom: number }, "round" | "butt" | "square"][];
type: "interval";
}
| {
default?: "round"
| "butt"
| "square";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
"round" | "butt" | "square",
][];
type: "categorical";
}
| { stops: [number, "round" | "bevel" | "miter"][]; type: "exponential" }
| { stops: [number, "round" | "bevel" | "miter"][]; type: "interval" }
| {
default?: "round" | "bevel" | "miter";
property: string;
stops: [number, "round" | "bevel" | "miter"][];
type: "exponential";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
stops: [number, "round" | "bevel" | "miter"][];
type: "interval";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
stops: [string | number | boolean, "round" | "bevel" | "miter"][];
type: "categorical";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
type: "identity";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
stops: [{ value: number; zoom: number }, "round" | "bevel" | "miter"][];
type: "exponential";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
stops: [{ value: number; zoom: number }, "round" | "bevel" | "miter"][];
type: "interval";
}
| {
default?: "round"
| "bevel"
| "miter";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
"round" | "bevel" | "miter",
][];
type: "categorical";
}
| {
stops: [number, "point" | "line" | "line-center"][];
type: "exponential";
}
| {
stops: [number, "point" | "line" | "line-center"][];
type: "interval";
}
| {
stops: [number, "source" | "auto" | "viewport-y"][];
type: "exponential";
}
| {
stops: [number, "source" | "auto" | "viewport-y"][];
type: "interval";
}
| {
stops: [number, "never" | "always" | "cooperative"][];
type: "exponential";
}
| {
stops: [number, "never" | "always" | "cooperative"][];
type: "interval";
}
| { stops: [number, "map" | "viewport" | "auto"][]; type: "exponential" }
| { stops: [number, "map" | "viewport" | "auto"][]; type: "interval" }
| {
default?: "map" | "viewport" | "auto";
property: string;
stops: [number, "map" | "viewport" | "auto"][];
type: "exponential";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
stops: [number, "map" | "viewport" | "auto"][];
type: "interval";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
stops: [string | number | boolean, "map" | "viewport" | "auto"][];
type: "categorical";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
type: "identity";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
stops: [{ value: number; zoom: number }, "map" | "viewport" | "auto"][];
type: "exponential";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
stops: [{ value: number; zoom: number }, "map" | "viewport" | "auto"][];
type: "interval";
}
| {
default?: "map"
| "viewport"
| "auto";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
"map" | "viewport" | "auto",
][];
type: "categorical";
}
| {
stops: [number, "none" | "width" | "height" | "both"][];
type: "exponential";
}
| {
stops: [number, "none" | "width" | "height" | "both"][];
type: "interval";
}
| [number, number, number, number]
| {
stops: [number, [number, number, number, number]][];
type: "exponential";
}
| {
stops: [number, [number, number, number, number]][];
type: "interval";
}
| { stops: [number, PaddingSpecification][]; type: "exponential" }
| { stops: [number, PaddingSpecification][]; type: "interval" }
| {
default?: PaddingSpecification;
property: string;
stops: [number, PaddingSpecification][];
type: "exponential";
}
| {
default?: PaddingSpecification;
property: string;
stops: [number, PaddingSpecification][];
type: "interval";
}
| {
default?: PaddingSpecification;
property: string;
stops: [string | number | boolean, PaddingSpecification][];
type: "categorical";
}
| { default?: PaddingSpecification; property: string; type: "identity" }
| {
default?: PaddingSpecification;
property: string;
stops: [{ value: number; zoom: number }, PaddingSpecification][];
type: "exponential";
}
| {
default?: PaddingSpecification;
property: string;
stops: [{ value: number; zoom: number }, PaddingSpecification][];
type: "interval";
}
| {
default?: PaddingSpecification;
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
PaddingSpecification,
][];
type: "categorical";
}
| {
default?: [number, number];
property: string;
stops: [number, [number, number]][];
type: "exponential";
}
| {
default?: [number, number];
property: string;
stops: [number, [number, number]][];
type: "interval";
}
| {
default?: [number, number];
property: string;
stops: [string | number | boolean, [number, number]][];
type: "categorical";
}
| { default?: [number, number]; property: string; type: "identity" }
| {
default?: [number, number];
property: string;
stops: [{ value: number; zoom: number }, [number, number]][];
type: "exponential";
}
| {
default?: [number, number];
property: string;
stops: [{ value: number; zoom: number }, [number, number]][];
type: "interval";
}
| {
default?: [number, number];
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
[number, number],
][];
type: "categorical";
}
| {
stops: [
number,
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "exponential";
}
| {
stops: [
number,
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "interval";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
number,
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "exponential";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
number,
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "interval";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
string
| number
| boolean,
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "categorical";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
type: "identity";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
{ value: number; zoom: number },
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "exponential";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
{ value: number; zoom: number },
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "interval";
}
| {
default?: | "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right",
][];
type: "categorical";
}
| {
stops: [number, "map" | "viewport" | "auto" | "viewport-glyph"][];
type: "exponential";
}
| {
stops: [number, "map" | "viewport" | "auto" | "viewport-glyph"][];
type: "interval";
}
| { stops: [number, string[]][]; type: "exponential" }
| { stops: [number, string[]][]; type: "interval" }
| {
default?: string[];
property: string;
stops: [number, string[]][];
type: "exponential";
}
| {
default?: string[];
property: string;
stops: [number, string[]][];
type: "interval";
}
| {
default?: string[];
property: string;
stops: [string | number | boolean, string[]][];
type: "categorical";
}
| { default?: string[]; property: string; type: "identity" }
| {
default?: string[];
property: string;
stops: [{ value: number; zoom: number }, string[]][];
type: "exponential";
}
| {
default?: string[];
property: string;
stops: [{ value: number; zoom: number }, string[]][];
type: "interval";
}
| {
default?: string[];
property: string;
stops: [{ value: string | number | boolean; zoom: number }, string[]][];
type: "categorical";
}
| {
stops: [number, "center" | "auto" | "left" | "right"][];
type: "exponential";
}
| {
stops: [number, "center" | "auto" | "left" | "right"][];
type: "interval";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [number, "center" | "auto" | "left" | "right"][];
type: "exponential";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [number, "center" | "auto" | "left" | "right"][];
type: "interval";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [string | number | boolean, "center" | "auto" | "left" | "right"][];
type: "categorical";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
type: "identity";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [
{ value: number; zoom: number },
"center" | "auto" | "left" | "right",
][];
type: "exponential";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [
{ value: number; zoom: number },
"center" | "auto" | "left" | "right",
][];
type: "interval";
}
| {
default?: "center"
| "auto"
| "left"
| "right";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
"center" | "auto" | "left" | "right",
][];
type: "categorical";
}
| (
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right"
)[]
| {
stops: [
number,
(
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right"
)[],
][];
type: "exponential";
}
| {
stops: [
number,
(
| "bottom"
| "center"
| "top"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right"
)[],
][];
type: "interval";
}
| VariableAnchorOffsetCollectionSpecification
| {
stops: [number, VariableAnchorOffsetCollectionSpecification][];
type: "exponential";
}
| {
stops: [number, VariableAnchorOffsetCollectionSpecification][];
type: "interval";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [number, VariableAnchorOffsetCollectionSpecification][];
type: "exponential";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [number, VariableAnchorOffsetCollectionSpecification][];
type: "interval";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [
string
| number
| boolean,
VariableAnchorOffsetCollectionSpecification,
][];
type: "categorical";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
type: "identity";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [
{ value: number; zoom: number },
VariableAnchorOffsetCollectionSpecification,
][];
type: "exponential";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [
{ value: number; zoom: number },
VariableAnchorOffsetCollectionSpecification,
][];
type: "interval";
}
| {
default?: VariableAnchorOffsetCollectionSpecification;
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
VariableAnchorOffsetCollectionSpecification,
][];
type: "categorical";
}
| ("horizontal" | "vertical")[]
| {
stops: [number, ("horizontal" | "vertical")[]][];
type: "exponential";
}
| { stops: [number, ("horizontal" | "vertical")[]][]; type: "interval" }
| {
stops: [number, "none" | "uppercase" | "lowercase"][];
type: "exponential";
}
| {
stops: [number, "none" | "uppercase" | "lowercase"][];
type: "interval";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [number, "none" | "uppercase" | "lowercase"][];
type: "exponential";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [number, "none" | "uppercase" | "lowercase"][];
type: "interval";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [string | number | boolean, "none" | "uppercase" | "lowercase"][];
type: "categorical";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
type: "identity";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [
{ value: number; zoom: number },
"none" | "uppercase" | "lowercase",
][];
type: "exponential";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [
{ value: number; zoom: number },
"none" | "uppercase" | "lowercase",
][];
type: "interval";
}
| {
default?: "none"
| "uppercase"
| "lowercase";
property: string;
stops: [
{ value: string
| number
| boolean; zoom: number },
"none" | "uppercase" | "lowercase",
][];
type: "categorical";
}
| { stops: [number, "ground" | "absolute"][]; type: "exponential" }
| { stops: [number, "ground" | "absolute"][]; type: "interval" }
| undefined,
];
command: "setLayoutProperty";
}
| { args: [string, FilterSpecification]; command: "setFilter" }
| { args: [string, SourceSpecification]; command: "addSource" }
| { args: [string]; command: "removeSource" }
| {
args: [string, string | GeoJSON<Geometry, GeoJsonProperties>];
command: "setGeoJSONSourceData";
}
| { args: [string, number, number]; command: "setLayerZoomRange" }
| { args: [string, string, unknown]; command: "setLayerProperty" }
| { args: [number[]]; command: "setCenter" }
| { args: [number]; command: "setCenterAltitude" }
| { args: [number]; command: "setZoom" }
| { args: [number]; command: "setBearing" }
| { args: [number]; command: "setPitch" }
| { args: [number]; command: "setRoll" }
| { args: [SpriteSpecification]; command: "setSprite" }
| { args: [string]; command: "setGlyphs" }
| { args: [FontFacesSpecification]; command: "setFontFaces" }
| { args: [TransitionSpecification]; command: "setTransition" }
| { args: [LightSpecification]; command: "setLight" }
| { args: [TerrainSpecification]; command: "setTerrain" }
| { args: [SkySpecification]; command: "setSky" }
| { args: [ProjectionSpecification]; command: "setProjection" }
| { args: [StateSpecification]; command: "setGlobalState" }
)[]Array list of changes
Diff two stylesheet
Creates semanticly aware diffs that can easily be applied at runtime. Operations produced by the diff closely resemble the maplibre-gl-js API. Any error creating the diff will fall back to the 'setStyle' operation.
Example diff: [ { command: 'setConstant', args: ['@water', '#0000FF'] }, { command: 'setPaintProperty', args: ['background', 'background-color', 'black'] } ]