Skip to content

SessionLifecycleEvent

SessionLifecycleEvent = SessionStartedEvent | { generation: number; type: "session.connected"; } | { generation: number; type: "session.disconnecting"; } | { generation: number; type: "session.disconnected"; } | { generation: number; type: "session.error"; }

Defined in: packages/realtime/src/lib/realtime-session/session-event-bus.ts:31

Connection lifecycle facts. Only the session knows them.

SessionStartedEvent


{ generation: number; type: "session.connected"; }

readonly generation: number

Connection generation the fact belongs to.

readonly type: "session.connected"

The provider connection of this generation is established.


{ generation: number; type: "session.disconnecting"; }

readonly generation: number

Connection generation the fact belongs to.

readonly type: "session.disconnecting"

Local teardown of this generation began.


{ generation: number; type: "session.disconnected"; }

readonly generation: number

Connection generation the fact belongs to.

readonly type: "session.disconnected"

The session is dormant after teardown.


{ generation: number; type: "session.error"; }

readonly generation: number

Connection generation the fact belongs to.

readonly type: "session.error"

The connection of this generation failed.