FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

IDocumentDeltaConnectionEvents: 'disconnect' event 'reason' parameter made optional in v2.60

Open RishhiB opened this issue 8 months ago • 1 comments

Broken API or pattern

The signature of the event listener for the disconnect event on the IDocumentDeltaConnectionEvents interface is changing. The reason parameter, previously required as IAnyDriverError, will now be optional (reason?: IAnyDriverError).

Old listener signature:

(event: "disconnect", listener: (reason: IAnyDriverError) => void);

New listener signature:

(event: "disconnect", listener: (reason?: IAnyDriverError) => void);

Justification for the change: This modification allows the system to differentiate between error-driven disconnects and clean/intentional disconnects (e.g., when Container.dispose() is called). In cases of a clean disconnect, no error object will be emitted.

This change is introduced in Pull Request #24528.

RishhiB avatar Jun 02 '25 16:06 RishhiB

moving to 2.60

RishhiB avatar Jun 11 '25 15:06 RishhiB

Closing since we are not going forward with making the disconnect event optional

RishhiB avatar Aug 06 '25 17:08 RishhiB