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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

import AutocompletePrediction to handleSelect functions parameter type #369

Closed
franciscovaz opened this issue Aug 26, 2020 · 2 comments
Closed

Comments

@franciscovaz
Copy link

Hello,
Could you export the types defined by the library? I'd appreciate having access to AutocompletePrediction, to add it to argument of handleSelect function.
Or there is another way to do it with typescript?

Thank you 馃憤

@wellyshen
Copy link
Owner

wellyshen commented Aug 27, 2020

@franciscovaz Actually, I have exported them. I think the Suggestion type is what you're looking for.

import { Suggestion } from "usePlacesAutocomplete";
 
const handleSelect = (suggestion: Suggestion) => (): void => {
    // Do something...
};

@franciscovaz
Copy link
Author

@wellyshen Yes, I had already done it, but i forgot to update the issue, sorry!

Thank you for the response, and very nice 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

2 participants