Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript #1

Open
tomgallagher opened this issue Oct 17, 2020 · 0 comments
Open

Typescript #1

tomgallagher opened this issue Oct 17, 2020 · 0 comments

Comments

@tomgallagher
Copy link

tomgallagher commented Oct 17, 2020

Hey

I've been enjoying your videos, I wanted to learn about d3 and need to build a racing bar chart so great!

I'm having some problems converting your code into Typescript, using @types/d3. Generally it's OK with things like NumberValue expected rather than Number or String. But I'm having trouble with the call function here

svg.select('.x-axis').style('transform', translateY(${dimensions.height}px)).call(xAxis);

Argument of type 'Axis' is not assignable to parameter of type '(selection: Selection<BaseType, unknown, null, undefined>, ...args: any[]) => void'.

Are you thinking about adding Typescript versions as well at any stage, so I can look at them as I convert?

Thanks

Tom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant