You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's difficult to wrap / extend the XYChart series components in TypeScript because they don't expose explicit exports of their prop types (which are generic).
It's possible to extract the prop types using something like: React.ComponentProps<typeof LineSeries> but they lose their generic properties due to the use of typeof.
Since other components do expose their props as exports, can we add the same for the series components?
I'm happy to raise a PR for this change.
The text was updated successfully, but these errors were encountered:
Hey @hellosmithy 👋 , I 100% agree this is a pain point and ideally the types would be exported. I don't have the bandwidth to do this right now but would happily review a PR 🙏
It's difficult to wrap / extend the XYChart series components in TypeScript because they don't expose explicit exports of their prop types (which are generic).
E.g. https://github.com/airbnb/visx/blob/master/packages/visx-xychart/src/components/series/LineSeries.tsx
It's possible to extract the prop types using something like:
React.ComponentProps<typeof LineSeries>
but they lose their generic properties due to the use oftypeof
.Since other components do expose their props as exports, can we add the same for the series components?
I'm happy to raise a PR for this change.
The text was updated successfully, but these errors were encountered: