From 3be54467eb7c187cc05ea3cca77c8472c4097906 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 15:21:22 +0100 Subject: [PATCH] Updated callbacks --- types/d3-graphviz/index.d.ts | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 12316c5147..8d703309ed 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -5,7 +5,7 @@ // TypeScript Version: 2.3 import { ZoomBehavior } from 'd3-zoom'; -import { Selection, BaseType } from 'd3-selection'; +import { Selection, BaseType, ValueFn } from 'd3-selection'; import { Transition } from 'd3-transition'; /** @@ -63,7 +63,7 @@ export interface Graphviz void): this; /** * Starts computation of the layout of a graph from the specified dotSrc string and saves the data for @@ -71,14 +71,14 @@ export interface Graphviz void): this; /** * Starts rendering of an SVG graph from data saved by {@link dot} and appends it to the selection * the grapviz renderer instance was generated on. * @param callback */ - render(callback?: Function): this; + render(callback?: () => void): this; /** * Sets the Graphviz layout engine name to the specified engine string. @@ -98,7 +98,7 @@ export interface Graphviz void): this; // Images /** @@ -113,7 +113,15 @@ export interface Graphviz): this; + /** + * Applies the specified transition name to subsequent SVG rendering. Accepts the same arguments + * as {@link d3-select.transition} or a function, but returns the graph renderer instance, not the + * transition. If name is a function, it is taken to be a transition factory. A transition factory + * is a function that returns a transition. + * @param name either a function returning a transition, a transition object or a string naming a + * transition + */ + transition(name?: () => Transition | string | Transition): this; /** * Returns the active transition on the generated graph's top level svg with the specified name, @@ -155,7 +163,7 @@ export interface Graphviz void): this; /** * Sets whether events are logged or not. @@ -260,7 +268,7 @@ export interface Graphviz): this; // Accessing Extracted Data /**