Type Alias: EqualizerRestoreResult
type EqualizerRestoreResult =
| {
settings: EqualizerSettings;
status: "restored";
}
| {
status: "empty";
}
| {
expected: number;
found: number | undefined;
status: "unsupportedVersion";
}
| {
reason: string;
status: "corrupt";
};
Defined in: packages/player/src/equalizer-storage.ts:106
What parseEqualizerSettings found. A typed result, never a throw: a
corrupt record is an ordinary runtime condition (a half-written file, an app
downgrade, a user clearing storage), and an app whose EQ screen has to
try/catch its cold start will eventually not.
A storage failure is different — that is a broken dependency, not bad data,
and it reaches the caller through UseEqualizerOptions.onStorageError.
Union Members
Type Literal
{
settings: EqualizerSettings;
status: "restored";
}
Type Literal
{
status: "empty";
}
Nothing has been saved yet.
Type Literal
{
expected: number;
found: number | undefined;
status: "unsupportedVersion";
}
Written by a different schema version. found is undefined if it was not a number.
Type Literal
{
reason: string;
status: "corrupt";
}
Unparseable, or parsed into something that is not a usable equaliser.