visgl / deck.gl

WebGL2 powered visualization framework
https://deck.gl
MIT License
12.29k stars 2.09k forks source link

[Doc]HexagonLayer: TypeScript example cannot be compiled #9176

Open clo-vis opened 2 months ago

clo-vis commented 2 months ago

Link

https://deck.gl/docs/api-reference/aggregation-layers/hexagon-layer

Description

The line

getTooltip: ({object}: PickingInfo<BikeRack>) => object && `Count: ${object.elevationValue}`,

in the TypeScript example cannot be compiled. The error the compiler issues is:

Property 'elevationValue' does not exist on type 'BikeRack'. ts(2339)

(using typescript 5.5.4)

Pessimistress commented 2 months ago

The HexagonLayer produces its own picking info type. This is fixed on the master branch and will land in 9.1.