283
*/
284
applyOptimistic(action: SessionAction): number {
286
>
this._pendingActions.push({ clientSeq, action });
287
>
// Apply on top of current optimistic
288
>
const base = this._optimisticState ?? this.verifiedValue;
289
>
if (base) {
290
>
this._optimisticState = sessionReducer(base, action as IProtocolSessionAction, this._log);
291
>
this._onDidChange.fire(this._optimisticState);
292
>
}
293
>
return clientSeq;
294
>
}
295
296
protected override _getOptimisticState(): SessionState | undefined {