d3-graphviz: fix graphviz() and selectWithoutDataPropagation() (#41376)

The return type of graphviz() is more specific now.
Added the missing parameter for selectWithoutDataPropagation()
and fixed the return type.
This commit is contained in:
Gergely Nagy
2020-01-03 12:55:28 -08:00
committed by Ryan Cavanaugh
parent 65c6b7d386
commit 78aff54e10
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -14,3 +14,6 @@ const options: d3Graphviz.GraphvizOptions = d3Graphviz.graphviz('').options();
// Can set the options
graphviz = graphviz.options(options);
// Can use selectWithoutDataPropagation
const selected = select('this').selectWithoutDataPropagation('that');
+2 -2
View File
@@ -19,13 +19,13 @@ declare module 'd3-selection' {
* @param options either a GraphvizOptions object representing the options of the graphviz renderer or a boolean representing the
* useWorker option.
*/
graphviz(options?: GraphvizOptions | boolean): Graphviz<GElement, Datum, BaseType, PDatum>;
graphviz(options?: GraphvizOptions | boolean): Graphviz<GElement, Datum, PElement, PDatum>;
/**
* For each selected element, selects the first descendant element that matches the specified selector string in the same ways as
* d3-selection.select, but does not propagate any associated data from the current element to the corresponding selected element.
*/
selectWithoutDataPropagation(): Selection<GElement, Datum, PElement, PDatum>;
selectWithoutDataPropagation(name: string): Selection<BaseType, Datum, PElement, PDatum>;
}
}