From cbc37b17c0c1557af7921e2d8a7adbfa86684be1 Mon Sep 17 00:00:00 2001 From: Cerberuser Date: Fri, 12 Oct 2018 23:32:37 +0700 Subject: [PATCH] plotly.js depends on older version of d3 (#29677) --- types/plotly.js/index.d.ts | 4 ++-- types/plotly.js/tsconfig.json | 3 +++ types/react-plotly.js/tsconfig.json | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 121001b49b..adf853af72 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -13,7 +13,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -/// +import * as _d3 from "d3"; export as namespace Plotly; export interface StaticPlots { @@ -189,7 +189,7 @@ export function plot(root: Root, data: Data[], layout?: Partial, config? export function relayout(root: Root, layout: Partial): Promise; export function redraw(root: Root): Promise; export function purge(root: Root): void; -export const d3: any; +export const d3: typeof _d3; export function restyle(root: Root, aobj: Data, traces?: number[] | number): Promise; export function update(root: Root, traceUpdate: Data, layoutUpdate: Partial, traces?: number[] | number): Promise; export function addTraces(root: Root, traces: Data | Data[], newIndices?: number[] | number): Promise; diff --git a/types/plotly.js/tsconfig.json b/types/plotly.js/tsconfig.json index dd21321c49..fe2dfd96bd 100644 --- a/types/plotly.js/tsconfig.json +++ b/types/plotly.js/tsconfig.json @@ -13,6 +13,9 @@ "typeRoots": [ "../" ], + "paths": { + "d3": [ "d3/v3" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/react-plotly.js/tsconfig.json b/types/react-plotly.js/tsconfig.json index e0ec629a4c..02d264a0e5 100644 --- a/types/react-plotly.js/tsconfig.json +++ b/types/react-plotly.js/tsconfig.json @@ -13,6 +13,9 @@ "typeRoots": [ "../" ], + "paths": { + "d3": [ "d3/v3" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true,