danmarshall/deckgl-typings

How to properly type getTooltip?

mattoni opened this issue · 3 comments

I'm having some trouble trying to get proper typings on getTooltip. Given the following code:

image

I get this error:
image

My layers are properly typed and working as intended, but for some reason PickInfo won't work with my custom object type. I don't see any constraints on D nor any other way to hint to the compiler what D is. Any help is greatly appreciated, thanks!

Can your provide a minimal code sample?

Hi, I faced same issue. Here is a code sample:
https://codesandbox.io/s/shy-waterfall-ocm3g
Thanks.

Hello, I am facing the same issue. Have not found a solution other than object as unknown as {my custom type}