Public function

Creates a derivation that represents the current presence state of the current user.

Signature
createPresenceStateDerivation: (
    $user: Signal<{
      color: string
      id: string
      name: string
    }>,
    instanceId?: TLInstancePresence['id']
  ) =>
  (store: TLStore) =>
    Signal<null | TLInstancePresence>
Parameters
NameDescription

$user

Signal<{
  color: string
  id: string
  name: string
}>

instanceId

TLInstancePresence['id']
Returns
(store: TLStore) => Signal<null | TLInstancePresence>
References

TLInstancePresence, TLStore

Source

packages/tlschema/src/createPresenceStateDerivation.ts

createBindingValidatorcreateShapeId