Class Settings<TProperties>Abstract

Helper class for implementing a collection of settings that can be inherited at runtime from a parent collection of settings. Setting a value locally will override the inherited setting.

Type Parameters

  • TProperties

Hierarchy (view full)

Constructors

Properties

_handles: Handles<unknown, ResourceHandle>

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

Accessors

  • get parent(): this
  • The parent settings that these settings will inherit from.

    Returns this

  • set parent(value): void
  • Parameters

    • value: this

    Returns void

Methods

  • Gets the value for a setting that represents a collection.

    Type Parameters

    • T

    Parameters

    Returns Collection<T>

  • Gets a property which is itself an instance of Settings.

    Type Parameters

    Parameters

    • setting: keyof Settings<TProperties>

      The setting name.

    • factory: (() => T)

      A factory for creating the nested settings.

        • (): T
        • Returns T

    Returns T

  • The property keys and their metadata that are used to implement serializing and deserializing the class instance.

    Returns PropertyDefs<unknown>

  • Determines whether the specified setting has been modified locally or by any parent of the current settings instance.

    Type Parameters

    Parameters

    • setting: K

      The setting to check.

    Returns boolean

  • Sets the parent settings that these settings will inherit from.

    Parameters

    Returns void

  • Sets the value for a setting. This will override any inherited value for the setting.

    Type Parameters

    Parameters

    Returns void

  • Parameters

    • properties: Partial<unknown>

    Returns void

  • Parameters

    • properties: Partial<unknown>

    Returns Promise<void>

  • Returns void

  • Returns Promise<void>

  • Type Parameters

    • K extends never

    Parameters

    • key: K

    Returns unknown

  • Returns TProperties

  • Returns the serializable properties.

    Parameters

    • serializeMode: SerializeMode = "all"

      Optional. If specified, only properties that support the given serialization mode will be returned.

    Returns PropertyDefs<unknown>

  • Determines whether the settings have been locally modified in any way.

    Returns boolean

  • Determines whether the specified setting has been locally modified, and is thus overriding any inherited value.

    Parameters

    Returns boolean

  • Removes all local overrides, resetting all settings to their inherited values, if any.

    Returns void

  • Removes a local override for a setting and resets it to its inherited value, if any.

    Parameters

    Returns void