So there's still one lingering instance of the original issue.
I'm not sure what the fix should be. I'm not familiar with what you are using to generate types, and with how you want them to be inferred or whatever 🙇
Expected Behavior
Running tsc on a project which imports react-map-gl won't return any error
node_modules/react-map-gl/dist/esm/exports-mapbox.d.ts:19:5 - error TS2411: Property 'current' of type 'MapRef<Map> | undefined' is not assignable to 'string' index type 'MapRef<Map>'.
19 current?: _MapRef<MapboxMap>;
~~~~~~~
Found 1 error in node_modules/react-map-gl/dist/esm/exports-mapbox.d.ts:19
Description
Ref: https://github.com/visgl/react-map-gl/pull/2250
Repro: https://codesandbox.io/p/sandbox/wispy-thunder-tx58mq
The fix on the types generated from https://github.com/visgl/react-map-gl/blob/a5705d06b682ef8b52c811b6744f7e11e774ddf4/src/components/use-map.tsx#L55 didn't propagate automatically to the types generated from https://github.com/visgl/react-map-gl/blob/a5705d06b682ef8b52c811b6744f7e11e774ddf4/src/exports-mapbox.ts#L47
So there's still one lingering instance of the original issue.
I'm not sure what the fix should be. I'm not familiar with what you are using to generate types, and with how you want them to be inferred or whatever 🙇
Expected Behavior
Running
tsc
on a project which importsreact-map-gl
won't return any errorSteps to Reproduce
See repro at https://codesandbox.io/p/sandbox/wispy-thunder-tx58mq
Environment
Logs