deck.gl
deck.gl copied to clipboard
[Bug] Type TooltipContent is not exported by module @deck.gl/core
Description
If you want to add your own tooltip provider via attribute getTooltip to a Deck, you need to import the types PickingInfo and TooltipContent because getTooltip has the following signature:
getTooltip?: ((info: PickingInfo) => TooltipContent) | null;
While PickingInfo is properly exported by module @deck.gl/core, the type TooltipContent is not exported. The workaround is to import it from the declaring file like this:
import { TooltipContent } from '@deck.gl/core/lib/tooltip';
Although this import works, it actually breaks the module idea of Typescript.
Flavors
- [ ] Script tag
- [ ] React
- [ ] Python/Jupyter notebook
- [ ] MapboxOverlay
- [ ] GoogleMapsOverlay
- [ ] CartoLayer
- [ ] ArcGIS
Expected Behavior
Type TooltipContent is exported by https://github.com/visgl/deck.gl/blob/master/modules/core/src/index.ts
Steps to Reproduce
See my question https://github.com/visgl/deck.gl/discussions/8999 in discussions.
Environment
- Framework version: 9.0.21
- Browser: Chrome
- OS: Windows 10
Logs
No response