resourceType can be typed more strongly (ResourceType is exported by MapLibre). This should be fixed in the README.
resourceType can be undefined because maplibre types it as ?: ResourceType (why?!), but transformMapboxUrl does not allow this. This should be fixed in this project (probably?).
Both of these problems were reported by the TypeScript compiler.
Where we use this plugin, I've changed the code from the README to this:
resourceType
can be typed more strongly (ResourceType
is exported by MapLibre). This should be fixed in the README.resourceType
can beundefined
because maplibre types it as?: ResourceType
(why?!), buttransformMapboxUrl
does not allow this. This should be fixed in this project (probably?).Both of these problems were reported by the TypeScript compiler.
I'm also reporting this with maplibre, the original typing is here: https://github.com/maplibre/maplibre-gl-js/blame/main/src/util/request_manager.ts#L21