Instance members of Source doesn't have a type definition. #1855
Replies: 2 comments 2 replies
-
Please cast source to geojsonsource. |
Beta Was this translation helpful? Give feedback.
-
I'm finding this same problem and don't understand how to cast the returned Source as GeoJSONSource.
As far as I can tell this mimics the official docs here: https://docs.mapbox.com/mapbox-gl-js/api/sources/#geojsonsource#getclusterexpansionzoom, however, I'm getting a type error on
What is the proper way to do this? For what it's worth, I also get a type error on |
Beta Was this translation helpful? Give feedback.
-
https://maplibre.org/maplibre-gl-js-docs/api/sources/#geojsonsource-instance-members
Property 'getClusterExpansionZoom' does not exist on type 'Source'.
Property 'getClusterChildren' does not exist on type 'Source'.
Property 'getClusterLeaves' does not exist on type 'Source'.
Property 'setData' does not exist on type 'Source'.
and this causes a TypeScript compiler error.
Beta Was this translation helpful? Give feedback.
All reactions