Realtime Presence Docs conflict with type system

Hi, I'm trying to implement presence in my Nextjs application. I've been following the documentation as well as the guides on how to do this, but the docs seem to offer incorrect examples. Per the docs, I've set up the channel and subscription like so:
const channel = supabase.channel(`presence-${roomId}`, {
  config: {
      presence: {
          key: user.id,
      },
  },
});

channel
.on('presence', { event: 'sync' }, () => {
  const newState = channel.presenceState()
  console.log('sync', newState)
})
.subscribe(async (status) => {
  if (status === 'SUBSCRIBED') {
      const presenceTrackStatus = await channel.track({ 'user_id': 1 })
      console.log(presenceTrackStatus, 'presenceTrackStatus')
  }
})

return () => {
  channel.unsubscribe();
}


However, when i do this, i get an error in the subscribe callback that says:
Promise returned in function argument where a void return was expected.


Can i just ignore this, since it's coming from eslint? Or am i doing something wrong?
Was this page helpful?