Skip to main content

Class: Settings

Settings

Constructors

new Settings()

new Settings(base?): Settings

Parameters

base?: Settings

Returns

Settings

Defined in

packages/core/src/Settings.ts:14

Methods

dump()

dump(): Record<string, unknown>

Build a JSON representation of the current internal state of this settings object. The returned object can be safely passed to JSON.stringify function.

Returns

Record<string, unknown>

The JSON representation of the current state of this settings instance

Defined in

packages/core/src/Settings.ts:74


extend()

extend(): Settings

Returns

Settings

Defined in

packages/core/src/Settings.ts:49


forEach()

forEach(callback): void

Parameters

callback

Returns

void

Defined in

packages/core/src/Settings.ts:45


get()

get(key): unknown

Parameters

key: string

Returns

unknown

Defined in

packages/core/src/Settings.ts:31


import()

import(root): void

Recursively import all properties from the given plain JavaScript object. This method has the opposite effect of the dump method.

Parameters

root: Record<string, unknown>

The root object whose properties will be imported.

Returns

void

Defined in

packages/core/src/Settings.ts:59


set()

set(key, value): boolean

Parameters

key: string

value: unknown

Returns

boolean

Defined in

packages/core/src/Settings.ts:27


unset()

unset(key): boolean

Unset a specific key or a set of keys within a namespace when the key ends with a dot (ASCII #46). If the key is ".", all keys will be removed and this command works as a reset.

Parameters

key: string

name The key to be unset or a namespace.

Returns

boolean

boolean

Defined in

packages/core/src/Settings.ts:41


assert()

static assert(subject): Settings

Parameters

subject: Settings

Returns

Settings

Defined in

packages/core/src/Settings.ts:84


extendRuntimeSettings()

static extendRuntimeSettings(): Settings

Returns

Settings

Defined in

packages/core/src/Settings.ts:144


getDefaultSettings()

static getDefaultSettings(subfield): unknown

Parameters

subfield: any = null

Returns

unknown

Defined in

packages/core/src/Settings.ts:90


getObjectSettings()

static getObjectSettings(subject, from?): Settings

Parameters

subject: unknown

from?: unknown

Returns

Settings

Defined in

packages/core/src/Settings.ts:123


getRuntimeSettings()

static getRuntimeSettings(): Settings

Returns

Settings

Defined in

packages/core/src/Settings.ts:113