diff --git a/types/d3-transition/d3-transition-tests.ts b/types/d3-transition/d3-transition-tests.ts index 19f05ec9c3..b3d8633a5f 100644 --- a/types/d3-transition/d3-transition-tests.ts +++ b/types/d3-transition/d3-transition-tests.ts @@ -421,6 +421,9 @@ if (listener) { // remove listener enterTransition = enterTransition.on('end', null); // check chaining return type by re-assigning +// check end method exists +enterTransition.end(); + // -------------------------------------------------------------------------- // Test Control Flow // -------------------------------------------------------------------------- diff --git a/types/d3-transition/index.d.ts b/types/d3-transition/index.d.ts index caff3a4112..64feb4f0a8 100644 --- a/types/d3-transition/index.d.ts +++ b/types/d3-transition/index.d.ts @@ -456,6 +456,11 @@ export interface Transition): this; + /** + * Returns a promise that resolves when every selected element finishes transitioning. If any element’s transition is cancelled or interrupted, the promise rejects. + */ + end(): Promise; + // Control Flow ---------------------- /**