Type alias DataManagerSubscription

DataManagerSubscription: {
    add?: DataManagerId[];
    remove?: DataManagerId[];
}

Used to subscribe or unsubscribe to data manager changes.

When a client connects, it subscribes to data managers it wants to sync with. The server then sends initial data and keeps the client updated with changes.

Type declaration

Example

// Subscribing to data managers
const subscription: DataManagerSubscription = {
add: [
{ id: "gameState" },
{ id: `player_${userId}` }
]
};

// Unsubscribing from data managers
const unsubscription: DataManagerSubscription = {
remove: [{ id: "temporaryEvent" }]
};