Skip to content

applyPrediction

applyPrediction(predictFunc): Patch

Defined in: prediction.ts:114

Run the provided function, while treating all changes to Observables as predictions, meaning they will be reverted when changes come back from the server (or some other async source).

() => void

The function to run. It will generally modify some Observables to immediately reflect state (as closely as possible) that we expect the server to communicate back to us later on.

Patch

A Patch object. Don’t modify it. This is only meant to be passed to applyCanon.