form-js icon indicating copy to clipboard operation
form-js copied to clipboard

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

Open MUSTJPI opened this issue 1 year ago • 2 comments

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 avatar Apr 16 '24 07:04 MUSTJPI

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

MUSTJPI avatar Apr 16 '24 12:04 MUSTJPI

Also had this issue

CaptainGlac1er avatar Oct 02 '24 14:10 CaptainGlac1er