Skip to main content

Function: useSetting

useSetting<T>(selector): T | undefined

Type parameters

NameTypeDescription
Tanythe type of the entry identified by selector in settings.ts

Example: useSetting<string>('server.baseUrl');

Parameters

NameTypeDescription
selectorstringThe key. Example server.baseUrl

Returns

T | undefined

Defined in

onekijs/packages/onekijs-framework/src/app/useSetting.ts:19

useSetting<T>(selector, defaultValue): T | undefined

Type parameters

NameType
Tany

Parameters

NameType
selectorstring
defaultValueundefined

Returns

T | undefined

Defined in

onekijs/packages/onekijs-framework/src/app/useSetting.ts:20

useSetting<T>(selector, defaultValue): T | null

Type parameters

NameType
Tany

Parameters

NameType
selectorstring
defaultValuenull

Returns

T | null

Defined in

onekijs/packages/onekijs-framework/src/app/useSetting.ts:21

useSetting<T>(selector, defaultValue): T

Type parameters

NameType
Tany

Parameters

NameType
selectorstring
defaultValueT

Returns

T

Defined in

onekijs/packages/onekijs-framework/src/app/useSetting.ts:22