Turns the JSON that the API, the socket and the browser's storage hand back,
where dates are ISO strings (Wire), into the shared types with
Dates. Every reader of those sources calls these on what it receives. The
shape is not checked.
Returns raw as an AuthResponse.
Returns raw as a Category.
Returns raw as a ChatMessage.
Returns raw as a Comment.
Returns raw as a Dump.
Returns raw as an Invitee.
Returns raw as a Playlist.
Returns raw as a PlaylistWithDumps, its dumps included.
Returns raw as a PublicUser.
Returns raw as a SelfUser.
Returns raw as a Dump, for useFeedCache, which reads it back
untyped from sessionStorage.
Returns raw as a Notification, for useFeedCache, which reads it
back untyped from sessionStorage.
Returns raw as a Playlist, for useFeedCache, which reads it back
untyped from sessionStorage.
Usage
import * as mod from "src/utils/shared/deserialize.ts";