thiagoelg opened a new issue, #1475:
URL: https://github.com/apache/incubator-kie-issues/issues/1475
## Steps to reproduce
- Import any of the classic editors in a Typescript file:
```js
import * as DmnEditor from
"@ibm/bamoe-standalone-bpmn-and-dmn-editors-classic/dist/dmn";
import * as BpmnEditor from
"@ibm/bamoe-standalone-bpmn-and-dmn-editors-classic/dist/bpmn";
```
- Write the code to open the editor:
```js
const editor = DmnEditor.open({
container: document.getElementById("dmn-editor-container")!,
initialContent: loadFile("can-drive.dmn"),
resources: new Map([
["path1/can-drive-types.dmn", { contentType: "text", content:
loadFile("can-drive-types.dmn") }],
["path2/loan-pre-qualification.dmn", { contentType: "text", content:
loadFile("loan-pre-qualification.dmn") }],
]),
readOnly: false,
});
```
- Typescript will show an error regarding the `resources` type:

- Trying to import the `ContentType` enum is not possible because it's
declared but not exported
## Workaround:
- Typecast the contentType property with `as any`:
```js
["path1/can-drive-types.dmn", { contentType: "text" as any, content:
loadFile("can-drive-types.dmn") }],
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]