tomwanzek / d3-v4-definitelytyped

[DEPRECATED] This repo was intended as a staging area for typescript definitions supporting the latest major release of D3js (i.e. version 4.1.x) by Mike Bostock. It has been migrated to DefinitelyTyped.
MIT License
53 stars 14 forks source link

d3.arc() #125

Closed NielsDM closed 8 years ago

NielsDM commented 8 years ago

The typings let me use d3.svg.arc() but in D3.js V4 you need to use d3.arc().

tomwanzek commented 8 years ago

@NielsDM Which typings did you install? My guess would be you downloaded npm install @types/d3 --save?

This would imply, you are using typings still in line with D3 v3.5.x (The version number of the package pulled from at types will tell you based on the major and minor version.)

The behavior you described, should not occur with the definitions contained in this repo, in particular the ones for the individual D3 modules.

All definitions in here have been migrated and are now actively maintained in DefinitelyTyped (types-2.0 branch) That is the branch which feeds the @types organization on npm from which you can download the latest.

There is however an open issue affecting the definitions published for the "standard bundle", see DT issue 11367. That is the structural reason, why the bundle definitions are not published through DT yet and you are still getting only D3 v3 definitions when you download d3 types.

Pls, let me know, if this answers your question, or if there is another quirk... :wink:

tomwanzek commented 8 years ago

So to add on: the definition you can work with is available at npm install @types/d3-shape --save. This way you will correctly have access to d3.arc() The current definitions version is located here