useSettingArray< Settings extends Record<string, Jsonifiable>, Defaults extends string | number | symbol, PathKey extends string, Fallback extends undefined | {} | Jsonifiable, Path extends string, Value,>( settings: SettingsManager<Settings, Defaults>, key: Path, fallback?: Fallback,): [ Value, ( newValue: | ChangeEvent<HTMLInputElement> | ValueAtPath<Settings, Path> | Settings[PathKey] | Record<string, unknown> & { checked?: ValueAtPath<Settings, Path>; value?: ValueAtPath<Settings, Path>; } | Record<string, unknown> & { checked?: Settings[PathKey]; value?: Settings[PathKey]; }, ) => void,] Type Parameters
- Settings extends Record<string, Jsonifiable>
- Defaults extends string | number | symbol
- PathKey extends string
- Fallback extends undefined | {} | Jsonifiable
- Path extends string
- Value
Returns [
Value,
(
newValue:
| ChangeEvent<HTMLInputElement>
| ValueAtPath<Settings, Path>
| Settings[PathKey]
| Record<string, unknown> & {
checked?: ValueAtPath<Settings, Path>;
value?: ValueAtPath<Settings, Path>;
}
| Record<string, unknown> & {
checked?: Settings[PathKey];
value?: Settings[PathKey];
},
) => void,
]