Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Improve typings for channel presence state #236

@agubler

Description

@agubler

Chore

Describe the chore

A user can pass custom state properties via the presence API and since #224 it is now possible to pass a generic that will adjust the types accordingly.

channel.presenceState<MyPresenceState>();

However it would be useful if we could stamp the presence types on creation of the channel

const channel = client.channel<MyPresenceState>('id', config);

// would enforce track to `MyPresenceState`
channel.track({ ... });

// return presence state as `MyPresenceState`
const presenceState = channel.presenceState();

Additional context

Please let me know if this is more than a chore and needs to be recorded elsewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions