【发布时间】:2017-11-03 11:31:09
【问题描述】:
我无法使用 d3 提示。
import * as d3 from "d3";
import "d3-tip";
var tool_tip = d3.tip()
我收到这样的错误。
Property 'tip' does not exist on type 'typeof "/home/viktor/projects/internet_trading_platform/client/node_modules/@types/d3/index"'.
我已导入 d3 提示模块,必须扩充 d3 模块。但事实并非如此。根据https://www.typescriptlang.org/docs/handbook/declaration-merging.html
问候。
d3-tip 声明位于此处https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/d3-tip/index.d.ts
【问题讨论】:
标签: typescript d3.js