如何解决过时的dc.js打字版本的问题?

时间:2016-11-07 21:55:00

标签: d3.js typescript dc.js crossfilter typescript-typings

我正在尝试使用dcjs,d3,使用typescript和jspm的crossfilter进行原型设计。我遇到的问题是d3的可用类型是版本4.2.38但dcjs类型是版本0.0.19,这取决于d3版本3.5.36。因此,当我编译时,我得到这样的错误:

node_modules/@types/dc/index.d.ts(104,32): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(104,80): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(130,26): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(130,53): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(131,29): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(131,56): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(132,39): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(132,87): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(134,22): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(134,41): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(192,20): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(194,23): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(197,27): error TS2305: Module '"/Users/meisam/code-archive/ts-proto/node_modules/@types/d3/index"' has no exported member 'svg'.
node_modules/@types/dc/index.d.ts(206,27): error TS2305: Module '"/Users/meisam/code-archive/ts-proto/node_modules/@types/d3/index"' has no exported member 'svg'.
node_modules/@types/dc/index.d.ts(227,33): error TS2305: Module '"/Users/meisam/code-archive/ts-proto/node_modules/@types/d3/index"' has no exported member 'layout'.
node_modules/@types/dc/index.d.ts(314,32): error TS2305: Module '"/Users/meisam/code-archive/ts-proto/node_modules/@types/d3/index"' has no exported member 'svg'.
node_modules/@types/dc/index.d.ts(334,32): error TS2305: Module '"/Users/meisam/code-archive/ts-proto/node_modules/@types/d3/index"' has no exported member 'geo'.
node_modules/@types/dc/index.d.ts(336,23): error TS2305: Module '"/Users/meisam/code-archive/ts-proto/node_modules/@types/d3/index"' has no exported member 'geo'.
node_modules/@types/dc/index.d.ts(347,27): error TS2305: Module '"/Users/meisam/code-archive/ts-proto/node_modules/@types/d3/index"' has no exported member 'svg'.
node_modules/@types/dc/index.d.ts(358,28): error TS2305: Module '"/Users/meisam/code-archive/ts-proto/node_modules/@types/d3/index"' has no exported member 'svg'.
node_modules/@types/dc/index.d.ts(412,32): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).
node_modules/@types/dc/index.d.ts(412,83): error TS2314: Generic type 'Selection<GElement, Datum, PElement, PDatum>' requires 4 type argument(s).

有解决方案吗?

另外作为一般问题,如果某个javascript包的类型定义不可用,有没有办法生成它们?

0 个答案:

没有答案