Types
import type { Diagnostic, EditorProfileDefinition, IEditorProfileDefinition, PredefinedProfile, IPredefinedProfile } from "@arcgis/coding-components/components/types.js";

Type definitions

Diagnostic

Type definition
Supertypes
Diagnostic

EditorProfileDefinition

Type definition

Editor Profile definition used for configuring the editor:

  • presenting to the user the Arcade API
  • validating the expression
  • proposing code completion
  • formatting code

label

Property
Type
string | undefined

Optional label for the profile. Used in the editor when displaying the variables panel.

variables

Property
Type
ProfileVariable[]

The collection of variables that will be passed to the expression at execution time. The variable declarations are used to help the editor provide validation and completion.

apiVersion

Property
Type
string | undefined

The version of the Arcade API that the editor should use during validation and completion.

bundles

Property
Type
BundleType[] | undefined

The Arcade API bundles that the editor should use during validation and completion.

additionalApiItems

Property
Type
ApiItem[] | undefined

A collection of additional Arcade API items that will be provided at runtime.

hiddenApiItems

Property
Type
string[] | undefined

A collection of api item names to hide.

IEditorProfileDefinition

deprecated Type definition

label

Property
Type
string | undefined

Optional label for the profile. Used in the editor when displaying the variables panel.

variables

Property
Type
ProfileVariable[]

The collection of variables that will be passed to the expression at execution time. The variable declarations are used to help the editor provide validation and completion.

apiVersion

Property
Type
string | undefined

The version of the Arcade API that the editor should use during validation and completion.

bundles

Property
Type
BundleType[] | undefined

The Arcade API bundles that the editor should use during validation and completion.

additionalApiItems

Property
Type
ApiItem[] | undefined

A collection of additional Arcade API items that will be provided at runtime.

hiddenApiItems

Property
Type
string[] | undefined

A collection of api item names to hide.

PredefinedProfile

Type definition

id

Property
Type
ProfileId

The well known profile ID.

disabledVariables

Property
Type
string[] | undefined

The variables that should be disabled for the profile.

definitions

Property
Type
VariableDefinitions

Provides the definitions for the definition based variables (feature, featureSet, featureSetCollection).

hiddenApiItems

Property
Type
string[] | undefined

A collection of api item names to hide.

IPredefinedProfile

deprecated Type definition

id

Property
Type
ProfileId

The well known profile ID.

disabledVariables

Property
Type
string[] | undefined

The variables that should be disabled for the profile.

definitions

Property
Type
VariableDefinitions

Provides the definitions for the definition based variables (feature, featureSet, featureSetCollection).

hiddenApiItems

Property
Type
string[] | undefined

A collection of api item names to hide.

ProfileVariableValueType

Type definition

The type of value variables supported.

Type
"boolean" | "date" | "dateOnly" | "geometry" | "knowledgeGraph" | "number" | "text" | "time"

IProfileVariable

deprecated Type definition
Supertypes
ProfileVariable

ProfileVariableBase

Type definition

Properties common to all profile variables.

name

Property
Type
string

Name of the variable

description

Property
Type
string | undefined

Description for the variable

IProfileVariableBase

deprecated Type definition

name

Property
Type
string

Name of the variable

description

Property
Type
string | undefined

Description for the variable

ProfileValue

Type definition

Single value profile variable declaration.

Supertypes
ProfileVariableBase

type

readonly Property
Type
ProfileVariableValueType

IProfileValue

deprecated Type definition

type

readonly Property
Type
ProfileVariableValueType

ProfileDictionary

Type definition

Dictionary profile variable declaration. Properties of a dictionary are profile variables.

Supertypes
ProfileVariableBase

type

readonly Property
Type
"dictionary"

properties

Property
Type
ProfileVariable[] | undefined

The dictionary properties. Properties are variables as well.

IProfileDictionary

deprecated Type definition

type

readonly Property
Type
"dictionary"

properties

Property
Type
ProfileVariable[] | undefined

The dictionary properties. Properties are variables as well.

ProfileArray

Type definition

Dictionary profile variable declaration. Properties of a dictionary are profile variables.

Supertypes
ProfileVariableBase

type

readonly Property
Type
"array"

elementType

Property
Type
ProfileVariable | undefined

The type for the array elements.

IProfileArray

deprecated Type definition

type

readonly Property
Type
"array"

elementType

Property
Type
ProfileVariable | undefined

The type for the array elements.

ProfileFeature

Type definition

Feature profile variable declaration. Features contains values that can be accessed by a name (aka field name or attribute name). Optionally features can have a geometry that can be accessed by a specialized Arcade function.

Supertypes
ProfileVariableBase

type

readonly Property
Type
"feature"

definition

Property
Type
FeatureDefinition | undefined

Describes how the editor will find the definition for the feature.

IProfileFeature

deprecated Type definition

type

readonly Property
Type
"feature"

definition

Property
Type
FeatureDefinition | undefined

Describes how the editor will find the definition for the feature.

ProfileFeatureSet

Type definition

FeatureSet profile variable declaration. FeatureSet represents a collection of Features. Individual feature or subset of features can be accessed by using specialized Arcade functions.

Supertypes
ProfileVariableBase

type

readonly Property
Type
"featureSet"

definition

Property
Type
FeatureSetDefinition | undefined

Describes how the editor will find the definition for the feature set.

IProfileFeatureSet

deprecated Type definition

type

readonly Property
Type
"featureSet"

definition

Property
Type
FeatureSetDefinition | undefined

Describes how the editor will find the definition for the feature set.

ProfileFeatureSetCollection

Type definition

FeatureSetCollection profile variable declaration. FeatureSetCollections are used to represent Feature Services or Web Maps in Arcade expressions. FeatureSetCollections expose two collections of Layers and Tables.

Supertypes
ProfileVariableBase

type

readonly Property
Type
"featureSetCollection"

definition

Property
Type
FeatureSetCollectionDefinition | undefined

Describes how the featureSetCollection will find its definition.

IProfileFeatureSetCollection

deprecated Type definition

type

readonly Property
Type
"featureSetCollection"

definition

Property
Type
FeatureSetCollectionDefinition | undefined

Describes how the featureSetCollection will find its definition.

ProfileVoxel

Type definition

Voxel profile variable declaration.

Supertypes
ProfileVariableBase

type

readonly Property
Type
"voxel"

definition

Property
Type
VoxelDefinition | undefined

Describes how the editor will find the definition for the voxel.

IProfileVoxel

deprecated Type definition

type

readonly Property
Type
"voxel"

definition

Property
Type
VoxelDefinition | undefined

Describes how the editor will find the definition for the voxel.

ProfilePixel

Type definition

Pixel profile variable declaration.

Supertypes
ProfileVariableBase

type

readonly Property
Type
"pixel"

definition

Property
Type
PixelDefinition | undefined

Describes how the editor will find the definition for the pixel.

IProfilePixel

deprecated Type definition

type

readonly Property
Type
"pixel"

definition

Property
Type
PixelDefinition | undefined

Describes how the editor will find the definition for the pixel.

FeatureLikeProfile

Type definition

IFeatureLikeProfile

deprecated Type definition

PortalItemProperties

Type definition

Describes a portal item.

id

Property
Type
string

The unique portal item id.

portal

Property
Type
{ url: string; } | undefined

The optional portal url. Default: www.arcgis.com.

IPortalItemProperties

deprecated Type definition

id

Property
Type
string

The unique portal item id.

portal

Property
Type
{ url: string; } | undefined

The optional portal url. Default: www.arcgis.com.

PortalItemDefinition

Type definition

WebMap and Service FeatureSetCollection can be defined by a portal item.

portalItem

Property
Type
PortalItemProperties

Describes a portal item.

IPortalItemDefinition

deprecated Type definition

portalItem

Property
Type
PortalItemProperties

Describes a portal item.

FeatureLayerItemDefinition

Type definition

FeatureLayer can be defined from a Feature Layer portal item.

layerId

Property
Type
number | undefined

The layer id in the feature layer portal item. Default to 0.

IFeatureLayerItemDefinition

deprecated Type definition

layerId

Property
Type
number | undefined

The layer id in the feature layer portal item. Default to 0.

UrlDefinition

Type definition

FeatureLayers and GroupLayers can be created by providing the url to the resource in a feature service.

url

Property
Type
string | null | undefined

The url of the resource.

IUrlDefinition

deprecated Type definition

url

Property
Type
string | null | undefined

The url of the resource.

FieldsDefinition

Type definition

The most basic way to define a feature or feature set is by passing a collection of fields

Supertypes
Pick<FeatureLayer‚ "fields">

IFieldsDefinition

deprecated Type definition
Supertypes
FieldsDefinition

FeatureDefinition

Type definition

FeatureDefinition represents various ways a Feature variable could be defined. Layer instance is the most common way to define a feature, the minimum required is that the layer instance exposes a collection of fields. An object with just fields can be used to define a feature from a collection of fields. An object with a url property can be used to define a feature from a feature service. An object with minimal portal item properties and a layer id can be used to define a feature from a feature layer portal item. For the last two options, a feature layer instance will be created by the editor profile.

VoxelDefinition

Type definition

VoxelDefinition represents various ways a Voxel variable could be defined. Layer instance is the most common way to define a voxel.

PixelDefinition

Type definition

PixelDefinition represents various ways a Pixel variable could be defined.

FeatureSetDefinition

Type definition

FeatureSetDefinition represents the various ways a FeatureSet variable could be defined. See FeatureDefinition for more details.

FeatureSetCollectionDefinition

Type definition

FeatureSetCollectionDefinition represents the various ways a FeatureSetCollection could be defined as a feature service or a web map.

VariableDefinitions

Type definition

A collection of variables that make up a profile definition.

ExtendedPredefinedProfile

Type definition
Supertypes
PredefinedProfile

additionalVariables

Property
Type
ProfileVariable[] | undefined

IExtendedPredefinedProfile

deprecated Type definition
Supertypes
IPredefinedProfile

additionalVariables

Property
Type
ProfileVariable[] | undefined

EditorCodeSuggestionGroup

Type definition

label

Property
Type
string

Label for the suggestion group

suggestions

Property
Type
EditorCodeSuggestion[]

List of suggestions for the group

IEditorCodeSuggestionGroup

deprecated Type definition

label

Property
Type
string

Label for the suggestion group

suggestions

Property
Type
EditorCodeSuggestion[]

List of suggestions for the group

EditorCodeSuggestion

Type definition

label

Property
Type
string

A short label for the suggestion. Can be thought as a title

description

Property
Type
string | undefined

A short description that will be showed below the label in the list of suggestions panel

documentation

Property
Type
string | undefined

Markdown string that will be rendered along with the code in the detail panel

code

Property
Type
string

The code for the suggestion. Will be injected in the editor is selected

IEditorCodeSuggestion

deprecated Type definition

label

Property
Type
string

A short label for the suggestion. Can be thought as a title

description

Property
Type
string | undefined

A short description that will be showed below the label in the list of suggestions panel

documentation

Property
Type
string | undefined

Markdown string that will be rendered along with the code in the detail panel

code

Property
Type
string

The code for the suggestion. Will be injected in the editor is selected

SidePanelName

Type definition
Type
"api" | "none" | "suggestions" | "variables"

ContextReferences

Type definition

spatialReference

Property
Type
SpatialReference | { wkid: number; } | null | undefined

Spatial reference object used to define the spatial reference for the arcade runtime. By defaults, the spatial reference is set to Web Mercator (wkid: 3857).

timeZone

Property
Type
string | undefined

Defines the default time zone in which to create and display Arcade date types. By default, the time zone is set to "system".

services

Property
Type
ArcadeServices | undefined

Defines the "services" passed to the arcade executor.

IContextReferences

deprecated Type definition

spatialReference

Property
Type
SpatialReference | { wkid: number; } | null | undefined

Spatial reference object used to define the spatial reference for the arcade runtime. By defaults, the spatial reference is set to Web Mercator (wkid: 3857).

timeZone

Property
Type
string | undefined

Defines the default time zone in which to create and display Arcade date types. By default, the time zone is set to "system".

services

Property
Type
ArcadeServices | undefined

Defines the "services" passed to the arcade executor.

EditorTestContext

Type definition

If a profile doesn't contain a map, the spatial reference of geometries will be defaulted to wkid: 3857. The test context objects allows to set the execution spatial reference for such scenario.

Supertypes
ContextReferences

profileVariableInstances

Property
Type
ProfileVariableInstances

An object of key/value pairs where the key is the name of a profile variable. The key's value must be of type ArcGIS core ProfileVariableInstance.

IEditorTestContext

deprecated Type definition
Supertypes
IContextReferences

profileVariableInstances

Property
Type
ProfileVariableInstances

An object of key/value pairs where the key is the name of a profile variable. The key's value must be of type ArcGIS core ProfileVariableInstance.