stack-auth / stack

Open-source Auth0/Clerk alternative
https://stack-auth.com
Other
4.11k stars 262 forks source link

Delete team from user object from client side #336

Open ndeitch opened 1 week ago

ndeitch commented 1 week ago

Description

I'm working on to delete users' team from client side, although neither user nor team object has delete function support in the client side (ServerTeam type does support team.delete())

I was reading the docs and it says that it should support, is the doc correct?

Environment

How to reproduce

'use client'

import { useUser } from '@stackframe/stack'

export default function Page() {
  const user = useUser()
  const team = user.selectedTeam
  team.delete() // Property 'delete' does not exist on type 'Team'.ts(2339)

  return <h1>Deleted</h1>
}