@types/highcharts package and had problems.Definitions by: in index.d.ts) so they can respond.If you do not mention the authors the issue will be ignored.
Update type definitions for Highcharts 6.x.x
I'd like to open PR, but I also would like to get basic contribution guidelines for this package from authors, some insights on how hierarchy organized (seems like all charts have to derive from SeriesChart) or other details I need to know before starting. Or authors can update package by themselves if they want
Package | Version
------------ | -------------
typescript | 2.5.3
highcharts | 6.0.4
@types/highcharts | 5.0.15
Thanks @Tauka. I'm just one of the more recent, minor contributors - not owners! - of the Highcharts typings. In my experience, there is no formal description nor guidelines, other than read the current structure and try to adopt it similarly. Try avoid breaking backwards compatibility by keeping consistency the way. The tests help a bit with this!
I've done the 4.x=>5.x upgrade myself and I just had to lookup a lot through the Highcharts docs, and compare that with the already existing implementation. If you dive into it a bit, it makes sense. You already figured out the hierarchy with the SeriesChart. The same goes for configurations (settings), which are separated and also frequently inherited from several bases. For me, the most confusing part was the subtle differences between instances and configurations/settings.
Personally, I'm highly anticipating Highcharts own, official support of typings. There is some progress on this, but it's not there yet. Until then; go for it!
@hanssens
I started using DefinteteType for Highcharts, and it's working for my react/typescript project. However, the accessibility module is missing. Will you be able to add that? I had an impression that the accessibility works since the interface is available. Now I understand that without the accessibility module, we can't take full advantage of accessibility which is one of the requirements of investing in Highcharts.
I have been reading https://github.com/highcharts/highcharts/issues/4876 and hopeful about the progress. However, in the meantime, will there be any updates for accessibility?
@sumanac I won't be able to invest time into it. But of course, it's a community effort to keep things up and running the best we can by allowing anyone - like yourself - to contribute this as a PR.
At least until highcharts/highcharts#4876, like you mentioned, becomes effective. This is actually THE topic on which Highcharts/TypeScript users should let their voice be heard. Just like you did. Getting dedicated support for TypeScript by Highcharts itself is what we are all anxiously waiting for.
Thanks @hanssens. I have the same problem with time management. I am really stretched right now. Also, I am pretty new to open source community and still tinkering with technologies.
I will try my best to keep the momentum going for typescript definition. In the meantime, I am working with Highsoft support team to find if I can load Highcharts as a JavaScript library and work around it until the typescript definition is available.
Bump, please update the typings
Some excellent progress has been made by @sophiebremer in https://github.com/highcharts/highcharts/issues/4876. These are the auto-generated type definitions from the Highcharts lib itself.
There are some remaining issues in there, and consider it a _preview_ version, but I would recommend everyone to give it a go by installing it through: npm i https://github.com/sophiebremer/highcharts-declarations-alpha.git
If you have any feedback on that package, please refer to the aforementioned issue.
Hello everyone!
We are working on an official Definitely Typed update for v6. This will count as a beta, because it will be incomplete and limited to Highcharts and some modules. Some functionality will be getting lost in comparison to the current state here. Depending on the ongoing progress Highstock might be added in a second pull request.
Declarations for the upcoming v7 will be integrated in our regular npm-based distribution.
Unfortunately the beta declarations are too huge for Definitely Typed, so we will come up with a different way of distribution. The pull request #29262 will probably not make it into a release.
Any updates on this? I constantly run into issues creating charts because a typing is missing. I really don't want to dumb down typescript to javascript because of that.
There is an official beta for Highcharts v6, that adds declarations to the npm distribution of Highcharts: https://github.com/highcharts/highcharts-declarations-beta
With Highcharts 7 the declarations will be part of the npm distribution itself, so no additional installation is required.
Will I need to keep @types/highcharts then or replace it with this? Replacing it causes issues with importing the library, import * as Highcharts from 'highcharts', using both still gives me the errors I previously had. Sorry I am fairly new to typescript and node.
You will only need @types/highcharts, if you are using Highcharts v5 or v4.
If you are using Visual Studio Code, you might need to reopen it after installation of declarations. It is also important to have moduleResolution in tsconfig.json set to node, otherwise TypeScript might not find modules with certain settings of module in tsconfig.json.
Highcharts v7 seem to include typings out of box:
https://github.com/highcharts/highcharts-dist/blob/8c6661a7b36bbed9f9fb679610af023c96c31373/package.json#L23
Is this issue still topical?
Is this issue still topical?
I would like to hope so. Not everyone is on v7. Using those typings creates problems between the versions. It is not very simple for a large scale corporation to move from version to version, so just updating is not going to do it for me unfortunately.
Most helpful comment
Hello everyone!
We are working on an official Definitely Typed update for v6. This will count as a beta, because it will be incomplete and limited to Highcharts and some modules. Some functionality will be getting lost in comparison to the current state here. Depending on the ongoing progress Highstock might be added in a second pull request.
Declarations for the upcoming v7 will be integrated in our regular npm-based distribution.