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

Export more TS types

Open Hankybree opened this issue 8 months ago • 1 comments

Motivation

Some types that are used are not exported. In this example we can use Offset and RGBAImage.

If we want use the same speification we now need to create our own type. The issue here is that if you change this in the future we will get a false positive that our typing is correct.

Design Alternatives

Be more generous with exporting types.

Design

NA

Mock-Up

NA

Concepts

NA

Implementation

TS only since we just want to use your specifications

Hankybree avatar Apr 03 '25 12:04 Hankybree

Hey, @Hankybree! Thank you for the report!

Some types weren't exported intentionally to emphasize that they are part of internal API, which we don't want to export, because it's not part of public API, which we don't want to break

Agree, that some of your examples can be considered as part of public API:

Not sure about RGBAImage, but maybe could you share your usage example? And if you have some other particular examples of missed types could you share them here as well? Thank you!

underoot avatar Apr 11 '25 15:04 underoot