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

Wrong typing for useMap props? #51

Open
eivindml opened this issue Jan 17, 2021 · 4 comments
Open

Wrong typing for useMap props? #51

eivindml opened this issue Jan 17, 2021 · 4 comments

Comments

@eivindml
Copy link

I'm using the useMap() hook, and I'm following the sample code from the README to add a default center location. But typescript gives my an error, says I'm missing some props.

I guess the props for the useMap hook is not properly defined?

Skjermbilde 2021-01-17 kl  12 00 56

@NadGuar
Copy link

NadGuar commented Nov 16, 2021

we're having the same exact issue

@chrisdrackett
Copy link
Owner

working on this a bit today, I'll see if I can find and fix this!

@chrisdrackett
Copy link
Owner

I'm not able to reproduce this. Can you create a breaking example and/or provide more code?

@catruzz
Copy link

catruzz commented Nov 19, 2021

Hi Chris. Here is a Codepen showing what is happening: link.
Actually we are not understanding what's going on here: basically seems that TS isn't able to infer all the constructor props you provided in utils.ts, not only about MapConstructionOptions (line 7 of codepen link provided above) but also MarkerConstructionOptions (line 22).
Thank you for your work!

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

4 participants