supabase / realtime-js

An isomorphic Javascript client for Supabase Realtime server.

Home Page:https://supabase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs for RealtimeChannelOptions inconsistent with implementation

mkcode opened this issue · comments

Bug report

The documentation on this repo is inconsistent the Types and implementation for RealtimeChannelOptions.

The docs indicate that no config keyword is needed for the channel method:

const channel = client.channel('presence-test', { presence: { key: '' } })

The type defs and implementation disagree:

export type RealtimeChannelOptions = {
config: {

and

this.params.config = {
...{
broadcast: { ack: false, self: false },
presence: { key: '' },
},
...params.config,
}

Not sure if the docs should be updated or the code. Let me know and I can submit a PR!

@mkcode thanks for pointing this out! it was indeed an issue with the readme so i updated it.