# 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)

- SerializableBase<unknown, this> & ObservableMixin<this>
  - Settings
    - FeatureSettings
    - Schema
    - TaskSettings
    - MapConstraints
    - FormatSettings

#####
Index

### Constructors

constructor

### Accessors

parent

### Methods

_getCollectionSetting
_getNestedSettings
_getSerializableProperties
_getSetting
_hasSettingIncludingAncestor
_setParent
_setSetting
_toPropertyDef
assignProperties
assignPropertiesAsync
finishAssignProperties
getDefault
getDefaults
getSerializableProperties
isModified
reset
toJSON

##
Constructors

### constructor

- new Settings<TProperties>(_properties?): Settings<TProperties>

- #### Type Parameters

  - TProperties

  #### Parameters

  - `Optional`_properties: unknown

  #### Returns Settings<TProperties>

  Inherited from observable(SerializableBase<unknown>).constructor

##
Accessors

### parent

- get parent(): this

- The parent settings that these settings will inherit from.

  #### Returns this

- set parent(value): void

- #### Parameters

  - value: this

  #### Returns void

##
Methods

### `Protected`_getCollectionSetting

- _getCollectionSetting<T>(setting): Collection<T>

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

  #### Type Parameters

  - T

  #### Parameters

  - setting: keyof Settings<TProperties>

    The setting name.

  #### Returns Collection<T>

### `Protected`_getNestedSettings

- _getNestedSettings<T>(setting, factory): T

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

  #### Type Parameters

  - T extends Settings<unknown>

  #### Parameters

  - setting: keyof Settings<TProperties>

    The setting name.

  - factory: (() => T)

    A factory for creating the nested settings.

    - - (): T

      - #### Returns T

### `Protected`_getSerializableProperties

- _getSerializableProperties(): PropertyDefs<unknown>

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

  #### Returns PropertyDefs<unknown>

  Inherited from observable(SerializableBase<unknown>)._getSerializableProperties

### `Protected`_getSetting

- _getSetting<K>(setting, defaultValue?): Settings<TProperties>[K]

- Gets the value for a setting.

  #### Type Parameters

  - K extends keyof Settings<TProperties>

  #### Parameters

  - setting: K

    The setting name.

  - `Optional` defaultValue: Settings<TProperties>[K]

    The default value if the setting is not explicitly set.

  #### Returns Settings<TProperties>[K]

### `Protected`_hasSettingIncludingAncestor

- _hasSettingIncludingAncestor<K>(setting): boolean

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

  #### Type Parameters

  - K extends keyof Settings<TProperties>

  #### Parameters

  - setting: K

    The setting to check.

  #### Returns boolean

### `Protected`_setParent

- _setParent(parent): void

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

  #### Parameters

  - parent: Settings<TProperties>

    The parent settings to inherit from.

  #### Returns void

### `Protected`_setSetting

- _setSetting<K>(setting, value): void

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

  #### Type Parameters

  - K extends keyof Settings<TProperties>

  #### Parameters

  - setting: K

    The setting name.

  - value: Settings<TProperties>[K]

    The setting value.

  #### Returns void

### `Protected`_toPropertyDef

- _toPropertyDef<T>(def): PropertyDef<T>

- Converts the value to a PropertyDef object.

  #### Type Parameters

  - T

  #### Parameters

  - def: PropertyDefSerializeMode | PropertyDefSerializeMode[] | PropertyDef<T>

    The value to convert.

  #### Returns PropertyDef<T>

  Inherited from observable(SerializableBase<unknown>)._toPropertyDef

### assignProperties

- assignProperties(properties): void

- #### Parameters

  - properties: Partial<unknown>

  #### Returns void

  #### Inherit Doc

  Inherited from observable(SerializableBase<unknown>).assignProperties

### assignPropertiesAsync

- assignPropertiesAsync(properties): Promise<void>

- #### Parameters

  - properties: Partial<unknown>

  #### Returns Promise<void>

  #### Inherit Doc

  Inherited from observable(SerializableBase<unknown>).assignPropertiesAsync

### finishAssignProperties

- finishAssignProperties(): Promise<void>

- #### Returns Promise<void>

  #### Inherit Doc

  Inherited from observable(SerializableBase<unknown>).finishAssignProperties

### getDefault

- getDefault<K>(key): unknown

- #### Type Parameters

  - K extends never

  #### Parameters

  - key: K

  #### Returns unknown

  #### Inherit Doc

  Inherited from observable(SerializableBase<unknown>).getDefault

### getDefaults

- getDefaults(): TProperties

- #### Returns TProperties

  #### Inherit Doc

  Overrides observable(SerializableBase<unknown>).getDefaults

### getSerializableProperties

- getSerializableProperties(serializeMode?): PropertyDefs<unknown>

- 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>

  Inherited from observable(SerializableBase<unknown>).getSerializableProperties

### isModified

- isModified(): boolean

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

  #### Returns boolean

- isModified(setting): boolean

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

  #### Parameters

  - setting: keyof Settings<TProperties>

    The setting to check.

  #### Returns boolean

### reset

- reset(): void

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

  #### Returns void

- reset(setting): void

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

  #### Parameters

  - setting: keyof Settings<TProperties>

    The setting to reset.

  #### Returns void

### toJSON

- toJSON(serializeMode?): TProperties

- #### Parameters

  - serializeMode: SerializeMode = "all"

  #### Returns TProperties

  #### Inherit Doc

  Overrides observable(SerializableBase<unknown>).toJSON