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

Support for typescript types #106

Closed
sosualfred opened this issue Nov 28, 2023 · 4 comments · Fixed by #115 or #116
Closed

Support for typescript types #106

sosualfred opened this issue Nov 28, 2023 · 4 comments · Fixed by #115 or #116
Labels
bug Something isn't working

Comments

@sosualfred
Copy link

Target Use Case

When developing with typescript. It can help with autocomplete and viewing the needed props.

Proposal

This feature will help make development in typescript easier.

@usefulthink
Copy link
Collaborator

Not sure what you are referring to, this library was written in typescript and already ships with the .d.ts files needed to enable typing support when using it.

Can you elaborate a bit more what your current setup looks like? Are you seeing any errors?

@usefulthink usefulthink added the needs more info Item needs further input from the creator label Nov 28, 2023
@sosualfred
Copy link
Author

sosualfred commented Nov 29, 2023

I am using NextJs 14 with TypeScript. And I am not seeing any errors.

MapControl works:
image

but Map does not work
image

@sosualfred
Copy link
Author

sosualfred commented Nov 29, 2023

It seems to be working now after I run:

npm i -D @types/google.maps

I think we need to update the docs to reflect this.

@usefulthink
Copy link
Collaborator

Oooh, that is actually a very good point! Thanks for spotting this.

@usefulthink usefulthink added bug Something isn't working and removed needs more info Item needs further input from the creator labels Nov 29, 2023
usefulthink added a commit to usefulthink/react-google-maps that referenced this issue Dec 1, 2023
we are reusing types from the @types/google.maps package for things like MapProps etc. To make sure those types are available when installing this package, we have to specify them as dependencies instead of devDependencies.

fixes visgl#106
usefulthink added a commit that referenced this issue Dec 1, 2023
we are reusing types from the @types/google.maps package for things like MapProps etc. To make sure those types are available when installing this package, we have to specify them as dependencies instead of devDependencies.

fixes #106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants