highcharts / highcharts

Highcharts JS, the JavaScript charting framework
https://www.highcharts.com
Other
12.02k stars 3.62k forks source link

TypeScript interface ExportingButtonsContextButtonThemeOptions is missing documented states property #21898

Open ulrichstark opened 3 weeks ago

ulrichstark commented 3 weeks ago

Expected behaviour

TypeScript shouldn't complain when I set the documented property options.exporting.buttons.contextButton.theme.states because as the docs for the theme property state:

"A configuration object for the button theme. The object accepts SVG properties like stroke-width, stroke and fill. Tri-state button styles are supported by the states.hover and states.select objects."

Actual behaviour

image

Because ExportingButtonsContextButtonThemeOptions in node_modules\highcharts\highcharts.d.ts is indeed missing the declaration for the property states.

Product version

"highcharts": "11.4.8"

I'm open to do the PR if you point me to where the change needs to happen.

hubertkozik commented 3 weeks ago

Hi @ulrichstark! You're right, this interface should contain declarations for states.

As a workaround you can extend the interface, like in this demo: https://stackblitz.com/edit/highcharts-angular-line-md2vbq?file=src%2Fapp%2Fapp.component.ts