Argument of type '"onBeforeRollupTaskDisplay"' is not assignable to parameter of type 'GanttEventName'.ts(2345)

Argument of type ‘“onBeforeRollupTaskDisplay”’ is not assignable to parameter of type ‘GanttEventName’.ts(2345)

I am getting this error in the licensed version but not on trial version.

Versions:
Trial Version 8.0.3
Licensed version: 8.0.1

Can someone tell me why?
@ramil

Hello,

It was an issue on our end. The onBeforeRollupTaskDisplay and onBeforeSplitTaskDisplay events were not included in the type definitions in version 8.0.1 of Gantt. However, these events have been added in version 8.0.2.

You can update to the latest version of Gantt to access the new event definitions. Alternatively, you can manually add these events to the GanttEventName type in the dhtmlxgantt.d.ts file.

Looks like a lot is restructured/refactored in dhtmlxgantt.d.ts file after 8.0.1. May I know where I can get the correct file for my licensed version? @ArtyomBorisevich

Hello,

Here is the type definitions file of Gantt v8.0.1:
dhtmlxgantt.d.ts (131.4 KB) ;
And here is the type definitions file of Gantt v8.0.2:
dhtmlxgantt.d.ts (139.9 KB) ;
And if you need the latest version:
dhtmlxgantt.d.ts (210.1 KB)

Took the latest dhtmlxgantt.d.ts as given above.
Replaced in the repo.
Repo is a fresh one with no node_modules.
Deleted package lock file.
Ran npm install.

Now the error on ‘“onBeforeRollupTaskDisplay” doesn’t come anymore. But the functionality doesn’t work. Code base works fine on Trial version 8.0.3.

Suggestions?

Hello,

The rollup feature should function correctly in previous versions of Gantt, and the onBeforeRollupTaskDisplay method should also work.

Unfortunately, I was not able to reproduce your issue.
The following snippet seems to work correctly for me:
DHTMLX Snippet Tool ;
Could you, please, provide a simplified demo, code snippet or a demo link, where the problem can be reproduced?