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

Missing tooltipOptions for class Series type #10814

Closed
briwa opened this issue May 24, 2019 · 4 comments
Closed

Missing tooltipOptions for class Series type #10814

briwa opened this issue May 24, 2019 · 4 comments
Assignees
Labels
Product: Docs Product: TypeScript Issues & enhancements related to TS/TypeScript Status: Won't fix

Comments

@briwa
Copy link
Contributor

briwa commented May 24, 2019

Expected behaviour

I should be able to find the types for tooltipOptions in Series Class when using Highcharts in Typescript.

Actual behaviour

There isn't any type for tooltipOptions in class Series.
Screen Shot 2019-05-24 at 12 12 49 PM
Also, there isn't one in the docs as well.

In the code, it seems to be there (CMIIW): https://github.com/highcharts/highcharts/blame/master/js/parts/Series.js#L2738

Live demo with steps to reproduce

Hover on any of the tooltips and see the console tab:
https://jsfiddle.net/eqw9ztvm/

Product version

I'm using Highcharts v7.1.1

Affected browser(s)

None

Note

I'm starting to think, is this supposed to be a private property (because it's not exposed in the docs)? If it is, might still wanna add in the type definitions too as private.

@sebastianbochan
Copy link
Contributor

Hi @briwa,
Thank you for reporting about the problem.

FYI @bre1470

@sebastianbochan sebastianbochan added Product: TypeScript Issues & enhancements related to TS/TypeScript Product: Docs labels May 24, 2019
@TorsteinHonsi
Copy link
Collaborator

@briwa There are many private properties in the Highcharts classes that are not (and should not be) exposed.

Probably you should access series.options.tooltip or the general tooltip.options instead. What is your use case?

@briwa
Copy link
Contributor Author

briwa commented May 27, 2019

@TorsteinHonsi Yes, my approach can definitely be changed. I was just thinking since it's there in the code, I just thought it was publicly available. So basically, if it's not in the docs, it's not meant to be public anyway, so it doesn't have the typing. Is that correct?

@bre1470
Copy link
Contributor

bre1470 commented Jun 3, 2019

Yes, that is our approach. Usually we try to expose as few properties as possible to prevent any future compatibility issues.

Additionally our TypeScript declarations are already huge, so we prefer to keep all private members out of it. I will therefor close this issue with a won't fix label.

Nevertheless feel free to point out missing properties, if there is no way to get them via other properties or functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product: Docs Product: TypeScript Issues & enhancements related to TS/TypeScript Status: Won't fix
Projects
None yet
Development

No branches or pull requests

4 participants