-
Notifications
You must be signed in to change notification settings - Fork 715
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(vx-voronoi): re-write package in TypeScript #512
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
/** className to apply to path element. */ | ||
className?: string; | ||
/** Array of coordinate arrays for the polygon (e.g., [[x,y], [x1,y1], ...]), used to generate polygon path. */ | ||
polygon?: number[][]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[number, number][]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this is not possible when the type is optional, build fails with this error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made it required to avoid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take that back, I think it comes from the @types/d3-voronoi
types
c29c465
to
38a068c
Compare
d2752ea
to
8502ad5
Compare
Hrmm, not really sure how to fix this one. I think this error is coming from the |
Looks like the tests are failing on const [, [x1, y1]] = v.extent(); Might try changing this to: const [[x0, y0], [x1, y1]] = v.extent(); |
8502ad5
to
00967c8
Compare
d838eb7
to
77d04c0
Compare
old school syntax worked 🎉 |
🚀 Enhancements
This PR builds off #488 which introduces Typescript build config, and re-writes the
@vx/voronoi
package in TypeScript.It also removes an unneeded
@vx/group
dependency. Closes #511.💥 Breaking Changes
React.Fragment
s, which requires bumping thepeerDep
forreact
to^16.3.0-0
Tests
/voronoi
demo@hshoff @schillerk @milesj @kristw @Rudeg