We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello!
First I want to say awesome lib.
I using typescript and whren I trying to use map ref by doing ref="mapRef".
Linting complains that ready doesn't exist on type never.
const panToAndZoom = (position: LatLng) => { if (mapRef.value?.ready) { mapRef.value.map.panTo(position); mapRef.value.map.setZoom(15); } };
To get it to work I had to to like this.
const panToAndZoom = (position: LatLng) => { const gmap = mapRef.value as InstanceType<typeof GoogleMap> | null; if (gmap?.ready) { gmap.map?.panTo(position); gmap.map?.setZoom(15); } };
The text was updated successfully, but these errors were encountered:
Hi @ChristherLenander I don't think there's a way around this. You can probably just declare your ref in a nicer way like this:
const mapRef = ref<InstanceType<typeof GoogleMap>>();
Sorry, something went wrong.
No branches or pull requests
Hello!
First I want to say awesome lib.
I using typescript and whren I trying to use map ref by doing ref="mapRef".
Linting complains that ready doesn't exist on type never.
To get it to work I had to to like this.
The text was updated successfully, but these errors were encountered: