bpmn-io / diagram-js

A toolbox for displaying and modifying diagrams on the web.
MIT License
1.65k stars 418 forks source link

chore: add some additional type corrections #875

Closed makepanic closed 3 months ago

makepanic commented 3 months ago

Hi,

I found some additional type incompatibilities when migrating to the most recent diagram-js version. Most of them seem to be non issues and just documenting incorrect types. Some of them were found due to intellij complaining that e.g. a switch uses a case which isn't possible according to the types.

I'm unsure if the Canvas.spec.ts canvas.scroll call previously actually tested something, because the x/y parameters weren't used anywhere in the canvas.scroll method.

The setRootElement return value is only there because the return type specifies it always returns something but in that case returned undefined

nikku commented 3 months ago

(And thanks for another nice contribution :medal_sports:).