Function: tracked()
On this page
tracked<
TData>(id,data):TrackedEnvelope<TData>
Defined in: packages/server/src/unstable-core-do-not-import/stream/tracked.ts:46
Gives a subscription event an id. When the connection drops, the client
reconnects with the last id it got, as input.lastEventId, so the
subscription can resume from there. The id can't be empty.
Type Parameters
| Type Parameter |
|---|
TData |
Parameters
| Parameter | Type |
|---|---|
id | string |
data | TData |
Returns
TrackedEnvelope<TData>
Example
yield tracked(post.id, post);