Interface TransitionLike<GElement, Datum>

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.

interface TransitionLike {
    on(type, listener): TransitionLike<GElement, Datum>;
    on(type, listener): TransitionLike<GElement, Datum>;
    selection(): Selection<GElement, Datum, any, any>;
    tween(name, tweenFn): TransitionLike<GElement, Datum>;
    tween(name, tweenFn): TransitionLike<GElement, Datum>;
}

Type Parameters

Methods

  • Returns Selection<GElement, Datum, any, any>