TransitionLike is a helper interface to represent a quasi-Transition, without specifying the full Transition interface in this file.
For example, wherever d3-zoom allows a Transition to be passed in as an argument, it internally immediately invokes its selection()
method to retrieve the underlying Selection object before proceeding.
d3-brush uses a subset of Transition methods internally.
The use of this interface instead of the full imported Transition interface is [referred] to achieve
two things:
(1) the d3-transition module may not be required by a projects use case,
(2) it avoids possible complications from 'module augmentation' from d3-transition to Selection.
TransitionLike is a helper interface to represent a quasi-Transition, without specifying the full Transition interface in this file. For example, wherever d3-zoom allows a Transition to be passed in as an argument, it internally immediately invokes its
selection()
method to retrieve the underlying Selection object before proceeding. d3-brush uses a subset of Transition methods internally. The use of this interface instead of the full imported Transition interface is [referred] to achieve two things: (1) the d3-transition module may not be required by a projects use case, (2) it avoids possible complications from 'module augmentation' from d3-transition to Selection.