@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
29 lines (27 loc) • 1.78 kB
TypeScript
import type { ClonableMixin } from "../../core/Clonable.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
export interface ExpressionInfoProperties extends Partial<Pick<ExpressionInfo, "expression" | "returnType" | "title">> {}
/**
* Defines a script expression that can be used to compute values. The script may refer to external data which will be available when the expression is being evaluated.
*
* @since 4.24
* @example
* let expression = new ExpressionInfo({
* title: "Notice",
* expression: "'You have entered' + $fencefeature.AREA_NAME"
* })
*/
export default class ExpressionInfo extends ExpressionInfoSuperclass {
constructor(properties?: ExpressionInfoProperties);
/** Optional expression in the [Arcade expression](https://developers.arcgis.com/arcade/) language. If no expression is provided, then the default empty expression produces a null, empty string, zero or false when evaluated (depending on usage and context). */
accessor expression: string | null | undefined;
/**
* Optional return type of the Arcade expression. Number values are assumed to be `double`. This can be determined by the authoring client by executing the expression using a sample feature, although it can be corrected by the user. Knowing the returnType allows the authoring client to present fields in relevant contexts. For example, numeric fields in numeric contexts such as charts.
*
* @default "string"
*/
accessor returnType: "number" | "string";
/** Optional title of the expression. Typically used when presenting the expression to end-users e.g. in dialogs, table-of-contents or editing tools. */
accessor title: string | null | undefined;
}
declare const ExpressionInfoSuperclass: typeof JSONSupport & typeof ClonableMixin