Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
clo-vis opened this issue Mar 10, 2025 · 0 comments
Open

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

clo-vis opened this issue Mar 10, 2025 · 0 comments
Labels

Comments

@clo-vis
Copy link

clo-vis commented Mar 10, 2025

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:

Type '({ object }: HexagonLayerPickingInfo<BikeRack>) => string | undefined' is not assignable to type '(info: { color: Uint8Array<ArrayBufferLike> | null; layer: Layer<{}> | null; sourceLayer?: Layer<{}> | null | undefined; viewport?: Viewport | undefined; ... 8 more ...; pixelRatio: number; }) => TooltipContent'.
  Type 'string | undefined' is not assignable to type 'TooltipContent'.
    Type 'undefined' is not assignable to type 'TooltipContent'.ts(2322)

(using typescript 5.7.3)

@clo-vis clo-vis added the doc label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant