StatesWorkspace Interface
StatesWorkspace maintains a registry of State objects that all share and provide access to presence state values across client members in a session.
State objects offer variations on how to manage states, but all share same principle that each client's state is independent and may only be updated by originating client.
Sealed
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
/** @sealed */
export interface StatesWorkspace<TSchema extends Partial<StatesWorkspaceSchema<TSchemaKeys>>, TManagerConstraints = unknown, TSchemaKeys extends string & keyof TSchema = string & keyof TSchema>
Type Parameters
| Parameter | Constraint | Default | Description |
|---|---|---|---|
| TSchema | Partial<StatesWorkspaceSchema<TSchemaKeys>> | ||
| TManagerConstraints | unknown | ||
| TSchemaKeys | string & keyof TSchema | string & keyof TSchema |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| controls | readonly | BroadcastControls | Default controls for management of broadcast updates. |
| presence | readonly | Presence | Containing Presence |
| states | readonly | StatesWorkspaceEntries<TSchema, TSchemaKeys> | Registry of State objects. |
Methods
| Method | Return Type | Description |
|---|---|---|
| add(key, configuration) | asserts this is StatesWorkspace<TSchema & Record<TKey, InternalTypes.ManagerFactory<TKey, TValue, TManager>>, TManagerConstraints> | Registers a new State object with the StatesWorkspace. |
Property Details
controls
Default controls for management of broadcast updates.
Signature
readonly controls: BroadcastControls;
Type: BroadcastControls
presence
Containing Presence
Signature
readonly presence: Presence;
Type: Presence