typescript(vx-threshold): re-write package in TypeScript #533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Enhancements
This PR builds off #488 which introduces Typescript build config, and re-writes the
@vx/threshold
package in TypeScript. It also exposes thedefined
prop from the@vx/shape
Area
component.This depends on types for
@vx/shape
(#507) and@vx/clip-path
(#497). Closes #530.💥 Breaking Changes
id
prop forThreshold
to be required. We've had user issues not understand that this is needed for multiple charts on a page (e.g., Multiple threshold graphs on the same page distort threshold fill #410) and stronger typing seems like a good time to fix this.(Alternatively we could try to more intelligently generate these but it doesn't seem too bad for a user to pass this.)
📝 Documentation
/threshold
demo to include a description and use red/green color blind friendly colors.Tests
/threshold
demo.d.ts
files@vx/shape
(typescript(vx-shape): Re-write package in TypeScript #507) and@vx/clip-path
(typescript(vx-clip-path): re-write package in TypeScript #497))@hshoff @techniq @schillerk @milesj @kristw @Rudeg