From 78aff54e10b2df3a63b294e6c917286eb9d613b3 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Fri, 3 Jan 2020 21:55:28 +0100 Subject: [PATCH] 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. --- types/d3-graphviz/d3-graphviz-tests.ts | 3 +++ types/d3-graphviz/index.d.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/d3-graphviz/d3-graphviz-tests.ts b/types/d3-graphviz/d3-graphviz-tests.ts index eef9436a09..7698a6fcdb 100644 --- a/types/d3-graphviz/d3-graphviz-tests.ts +++ b/types/d3-graphviz/d3-graphviz-tests.ts @@ -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'); diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index e3a30ce4f7..b96f60a20e 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -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; + graphviz(options?: GraphvizOptions | boolean): Graphviz; /** * 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; + selectWithoutDataPropagation(name: string): Selection; } }