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

How to properly type getTooltip? #208

Open
mattoni opened this issue Aug 13, 2021 · 3 comments
Open

How to properly type getTooltip? #208

mattoni opened this issue Aug 13, 2021 · 3 comments

Comments

@mattoni
Copy link

mattoni commented Aug 13, 2021

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!

@danmarshall
Copy link
Owner

Can your provide a minimal code sample?

@myo-shi
Copy link

myo-shi commented Oct 13, 2021

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

@ghost
Copy link

ghost commented Sep 27, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants