maplibre-gl-js icon indicating copy to clipboard operation
maplibre-gl-js copied to clipboard

type of `_controlPositions` property of the Map class

Open JabSYsEmb opened this issue 5 months ago • 1 comments

I just noticed that the vscode intelljsense does not autocomplate for _controlPositions of Map class and found out it is due to that it is defined as Record<string, HTMLElement>, is that intentionally? Or typed incorrectly since _controlPositions cannot be positioned other than what the ControlPosition type is

https://github.com/maplibre/maplibre-gl-js/blob/160b8f9c3feb0c44c7ab233d4cedaac569236e0b/src/ui/map.ts#L448

I fix the type locally and get the nitelljsense working fine as in the following screenshot:

image

JabSYsEmb avatar Sep 03 '24 20:09 JabSYsEmb