danmarshall/deckgl-typings

DeckProps getTooltip type is missing `string`

argdiego opened this issue · 2 comments

Hi! Great work and thanks a bunch for the typings!

Issue: I noticed that the following function return type is missing string:

This function type is inside DeckProps and defines what type the getTooltip? property has, which can either be a string, an object (of particular type) or null. Below is its location:

The function type above is currently:

		getTooltip?: <D>(
			info: PickInfo<D>
		) => null | {
			text?: string;
			html?: string;
			className?: string;
			style?: {};
		};

When it should be:

		getTooltip?: <D>(
			info: PickInfo<D>
		) => null | string | { // <-- change is here!
			text?: string;
			html?: string;
			className?: string;
			style?: {};
		};

...According to the Deck documentation (screenshot below):

Screen Shot 2021-02-18 at 4 54 41 PM

I will review this more thoroughly first and submit a PR in the upcoming days if that's ok with the community.

Cheers!

Diego

Hi @argdiego thanks for the report. PRs are absolutely welcome, thanks for being a part of the community!

Fix merged in PR #172