You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to consume the typed diagram-js features and noticed an error when trying to port from our types to the now officially shipped ones in diagram-js@11.13.
Currently ModelBaseAttrs has no type field in its interface definition:
Describe the Bug
Hi,
I'm trying to consume the typed diagram-js features and noticed an error when trying to port from our types to the now officially shipped ones in diagram-js@11.13.
Currently ModelBaseAttrs has no
type
field in its interface definition:https://github.com/bpmn-io/diagram-js/blob/develop/lib/model/index.d.ts#L11-L18
This means e.g. according to the types when using the ElementFactory createShape method, it doesn't accept a type:
https://github.com/bpmn-io/diagram-js/blob/develop/lib/core/ElementFactory.d.ts#L47
But seeing from how we already use it this is incorrect. It's also used with a
type
in the bpmn properties panel, e.g.https://github.com/bpmn-io/bpmn-js-properties-panel/blob/d91eca4bdb5a0602fb5a1858fbda8ae32e6c643d/test/spec/extension/ExamplePropertiesProvider.js#L120
If it's ok, I could change ModelBaseAttrs to also accept an optional
type?: string;
field.Steps to Reproduce
Steps to reproduce the behavior:
ElementFactory
createShape({ type: 'bpmn:ServiceTask' })
on itExpected Behavior
Typescript compiler doesn't complain
Environment
Please complete the following information:
The text was updated successfully, but these errors were encountered: