bpmn-io / form-js

View and visually edit JSON-based forms.
https://bpmn.io/toolkit/form-js/
Other
414 stars 107 forks source link

Error “Type ‘EventBus’ is not generic” when using form-js-editor with Angular & TS #1153

Open MUSTJPI opened 6 months ago

MUSTJPI commented 6 months ago

Hi,

I’m using Angular 16 / "typescript": "~4.9.5", and when I import form-js-editor, I got the following compile error : “Type ‘EventBus’ is not generic”

To make it work I have to modify the following line in \node_modules@bpmn-io\form-js-editor\dist\types\features\dragging\Dragging.d.ts :

_eventBus: import(“diagram-js/lib/core/EventBus”).default\<null>;

By

_eventBus: import(“diagram-js/lib/core/EventBus”).default;

OR

add “skipLibCheck” : true in tsconfig.json

But both solutions aren’t satisfying…

Thanks for your help

MUSTJPI commented 6 months ago

Didn't try, but should work : _eventBus: import(“diagram-js/lib/core/EventBus”).default\<any>;

CaptainGlac1er commented 1 month ago

Also had this issue