Prefer UserKeyDefinitions for `getUser` state (#9487)
This commit is contained in:
parent
6fa12fea49
commit
3e93fc9461
|
@ -6,7 +6,7 @@ import {
|
||||||
awaitAsync,
|
awaitAsync,
|
||||||
trackEmissions,
|
trackEmissions,
|
||||||
} from "../../../spec";
|
} from "../../../spec";
|
||||||
import { GENERATOR_DISK, KeyDefinition } from "../../platform/state";
|
import { GENERATOR_DISK, UserKeyDefinition } from "../../platform/state";
|
||||||
import { UserId } from "../../types/guid";
|
import { UserId } from "../../types/guid";
|
||||||
|
|
||||||
import { BufferedKeyDefinition } from "./buffered-key-definition";
|
import { BufferedKeyDefinition } from "./buffered-key-definition";
|
||||||
|
@ -16,8 +16,9 @@ const SomeUser = "SomeUser" as UserId;
|
||||||
const accountService = mockAccountServiceWith(SomeUser);
|
const accountService = mockAccountServiceWith(SomeUser);
|
||||||
type SomeType = { foo: boolean; bar: boolean };
|
type SomeType = { foo: boolean; bar: boolean };
|
||||||
|
|
||||||
const SOME_KEY = new KeyDefinition<SomeType>(GENERATOR_DISK, "fooBar", {
|
const SOME_KEY = new UserKeyDefinition<SomeType>(GENERATOR_DISK, "fooBar", {
|
||||||
deserializer: (jsonValue) => jsonValue as SomeType,
|
deserializer: (jsonValue) => jsonValue as SomeType,
|
||||||
|
clearOn: [],
|
||||||
});
|
});
|
||||||
const BUFFER_KEY = new BufferedKeyDefinition<SomeType>(GENERATOR_DISK, "fooBar_buffer", {
|
const BUFFER_KEY = new BufferedKeyDefinition<SomeType>(GENERATOR_DISK, "fooBar_buffer", {
|
||||||
deserializer: (jsonValue) => jsonValue as SomeType,
|
deserializer: (jsonValue) => jsonValue as SomeType,
|
||||||
|
|
Loading…
Reference in New Issue