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

Does d3-ease definition need to be updated? #132

Closed billdwhite closed 7 years ago

billdwhite commented 7 years ago

I am using a transition with an easing function in d3 in my Angular 2 typescript application. The following line of code, which I believe is valid, is generating errors when the typescript validation runs.

...
mySelection.enter().transition().ease(d3.easeElasticIn.amplitude(4).period(3)).attr("x", 100);
...

I get this error in the angular-cli 'ng build' process:

Property 'amplitude' does not exist on type '(normalizedTime: number) => number'

Looking at the d3-ease/index.d.ts file, I see this:

...
export function easeElasticIn(normalizedTime: number): number;
...

So is the d3-ease typescript definition just wrong? Looking at the d3 source code, it appears so but maybe I'm just not understanding something?

tomwanzek commented 7 years ago

@billdwhite thanks for reporting. I am closing this issue in favor of the newly opened DT issue 13767

billdwhite commented 7 years ago

Thanks!!!