Type Alias: UserSettingFromRecord<R, K>
UserSettingFromRecord<
R,K> =Kextends keyofR?UserSetting<ToNonNullable<PropertyTypeOf<R,K>>> |undefinedextendsR[K] ?undefined:never:undefined
Defined in: src/sdk/settings/UserSetting.ts:59
Retrieves a user setting from a user setting record by its name. If the provided name does not exist in the record,
then a type of undefined is returned. If the provided name is optional in the record, then a union type of
UserSetting<T> | undefined is returned, where T is the value type mapped to the name in the record.
Type Parameters
| Type Parameter | Description |
|---|---|
R extends UserSettingRecord | The user setting record from which to retrieve the setting. |
K extends string | The name of the setting to retrieve. |