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

Consistent export of types (e.g. ZoomState) #1735

Open
fl0711 opened this issue Jul 26, 2023 · 0 comments
Open

Consistent export of types (e.g. ZoomState) #1735

fl0711 opened this issue Jul 26, 2023 · 0 comments

Comments

@fl0711
Copy link

fl0711 commented Jul 26, 2023

Hi everyone,

I am using @visx/zoom and want to split a component into several subcomponents. However I am struggling with the type annotations in my subcomponents.
The type that I can't find the import path of, or that isn't exported, is ZoomState (the type of the zoom object seems to be ProvidedZoom<SVGSVGElement> & ZoomState)
I also had to check this issue #1693 to figure out that I had to import { ProvidedZoom, TransformMatrix } from '@visx/zoom/lib/types' (instead of '@visx/zoom') (Which I could have seen in my IDE as well...)

Do I have to define ZoomState myself? Or is there a type export systematic that I fail to see?
I am generally struggling with this in Typescript, because I have the feeling that every framework has its own way of handling this..

Thank you in advance!

Flo

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