d3 / d3-shape

Graphical primitives for visualization, such as lines and areas.
https://d3js.org/d3-shape
ISC License
2.48k stars 310 forks source link

The types for Arc are incorrect #198

Closed CruseCtrl closed 2 years ago

CruseCtrl commented 2 years ago

Using the first example on this page in a typescript file

const arc = d3.arc()
    .innerRadius(0)
    .outerRadius(100)
    .startAngle(0)
    .endAngle(Math.PI / 2);

arc();

Results in this error on the arc():

TS2555: Expected at least 1 arguments, but got 0.

index.d.ts(93, 18): An argument for 'd' was not provided.

I'm on the latest version of d3 (7.4.4), and typescript 4.5.5

Fil commented 2 years ago

We do not maintain the types, please open an issue with https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3