PresenceNotifications Interface
PresenceNotifications
maintains a registry of NotificationsManagers that facilitate messages across client members in a session.
This API is provided as an alpha preview and may change without notice.
To use, import via @fluidframework/presence/alpha
.
For more information about our API support guarantees, see here.
Signature
/** @sealed */
export interface PresenceNotifications<TSchema extends PresenceNotificationsSchema>
Type Parameters
Parameter | Constraint | Description |
---|---|---|
TSchema | PresenceNotificationsSchema |
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
props | Alpha |
readonly |
PresenceStatesEntries<TSchema> | Registry of Value Manager s. |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
add(key, manager) | Alpha |
asserts this is PresenceNotifications<TSchema & Record<TKey, InternalTypes.ManagerFactory<TKey, TValue, TManager>>> | Registers a new Value Manager with the PresenceNotifications. |
Property Details
props
Registry of Value Manager
s.
This API is provided as an alpha preview and may change without notice.
For more information about our API support guarantees, see here.
Signature
readonly props: PresenceStatesEntries<TSchema>;
Type: PresenceStatesEntries<TSchema>
Method Details
add
Registers a new Value Manager
with the PresenceNotifications.
This API is provided as an alpha preview and may change without notice.
For more information about our API support guarantees, see here.
Signature
add<TKey extends string, TValue extends InternalTypes.ValueDirectoryOrState<any>, TManager extends NotificationsManager<any>>(key: TKey, manager: InternalTypes.ManagerFactory<TKey, TValue, TManager>): asserts this is PresenceNotifications<TSchema & Record<TKey, InternalTypes.ManagerFactory<TKey, TValue, TManager>>>;
Type Parameters
Parameter | Constraint | Description |
---|---|---|
TKey | string | |
TValue | InternalTypes.ValueDirectoryOrState<any> | |
TManager | NotificationsManager<any> |
Parameters
Parameter | Type | Description |
---|---|---|
key | TKey | new unique key for the Value Manager within the workspace |
manager | InternalTypes.ManagerFactory<TKey, TValue, TManager> | factory for creating a Value Manager |
Returns
Return type: asserts this is PresenceNotifications<TSchema & Record<TKey, InternalTypes.ManagerFactory<TKey, TValue, TManager>>>