IDocumentDeltaConnectionEvents: 'disconnect' event 'reason' parameter made optional in v2.60
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.
moving to 2.60
Closing since we are not going forward with making the disconnect event optional