Open canadaduane opened 1 year ago
I have a typescript type that has several variants:
type PresenceType = | { status: "offline" } | { eventId: string status: "in-class" } | { eventId: string | null gameId: string | null status: "in-play" } const store = syncedStore({ presence: boxed({ status: "offline", }) as Box<PresenceType>, })
Now how do I assign this boxed object? The following is not allowed due to presence being read-only:
presence
store.presence = boxed({ status: "in-class", eventId: "xyz" })
I have a typescript type that has several variants:
Now how do I assign this boxed object? The following is not allowed due to
presence
being read-only: