Skip to main content
Version: v10.0.0

TrpcSocketExtraType

The extra of every subscription event, received by listen callbacks next to the data .


Import
import { TrpcSocketExtraType } from "@hyper-fetch/trpc"

Preview​

type TrpcSocketExtraType = {
eventId: string | null;
payload: unknown;
}

Structure​

TrpcSocketExtraType
NameTypeDescription
eventId
string | null

Id of an event yielded with tracked(id, data) , null for events without an id. The adapter sends the last one back as lastEventId when it restarts the subscription, so the server can resume.

payload
unknown

Input of the subscription the event belongs to. Listeners of one procedure with different inputs are separate subscriptions, so it tells them apart where events of every subscription meet, like socket.events.onListenerEvent .