Gantt TypeScript Definition File

Hi, I wanted to know the preferred method of including the dhtmlx Gantt definitely typed file to a gantt project -

Should we be using the npm @types/dhtmlxganttt package or including the definitions manually in the tsconfig?

Hello Brian,
As I see, the definitely typed types are very old (6.0) version:

Starting from the 6.1 version, the types are included in the package:
https://docs.dhtmlx.com/gantt/whatsnew.html#61

Unfortunately, there are some missing types. We are aware of that. That bug will be fixed in the future, but I cannot give you any ETA.

Are there any updates for missing types issue? Have it fixed?

Do you have gantt types in 7th version of Gantt?

Hello Brian,
The dev team added some types, but some other types are still missing. Unfortunately, I cannot give you any ETA on when it is going to be fixed.

1 Like

Hello Brian and Anton,
I would like to inform you that the dev team added more types in the 8.0 version:
https://docs.dhtmlx.com/gantt/whatsnew.html#x6629x80x6630x:~:text=Updated%20TypeScript%20type%20definitions
https://docs.dhtmlx.com/gantt/whatsnew.html#x6629x80x6630x:~:text=Type%20definitions%20are%20updated

Now there are types for the tasks, links, grid columns, scales, extensions, and almost everything in the others category:
https://docs.dhtmlx.com/gantt/desktop__task_properties.html
https://docs.dhtmlx.com/gantt/desktop__link_properties.html
https://docs.dhtmlx.com/gantt/api__gantt_columns_config.html
https://docs.dhtmlx.com/gantt/api__gantt_scales_config.html
https://docs.dhtmlx.com/gantt/api__gantt_ext_other.html
https://docs.dhtmlx.com/gantt/api__refs__gantt_others.html

You can update to the latest version to get more features and improvements, including the better Typescript Support.

However, even if you are using the older version and don’t have plans to upgrade, you can still use the updated version of the dhtmlxgantt.d.ts file as the Gantt API is mostly the same:

There are still ways to improve, so in the future versions, the dev team will add more types for Gantt.