mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Initial Typings for bpmn-moddle * Removal of Camunda Typings from repository * Header file and ensuring tslint extends correctly * Fix for tslint extending incorrectly * Removal of whitespace on line 1 for test runner. * Removed all additional tslint rules. Added corresponding fixes to typings. * Minor change to restart timing out build - Issue:20308
25 lines
758 B
TypeScript
25 lines
758 B
TypeScript
import * as BPMNModdle from "bpmn-moddle";
|
|
|
|
const moddle: BPMNModdle.Moddle = {} as any;
|
|
|
|
const element1 = moddle.create("bpmn:UserTask"); // Expect type User Task
|
|
element1.$type = "bpmn:UserTask"; // Expect to check against type correctly
|
|
|
|
const bpmnModdle: BPMNModdle.BPMNModdle = {} as any;
|
|
|
|
bpmnModdle.fromXML("", (err, definitions, parseContext) => {
|
|
err; // type of error
|
|
definitions; // type of definition
|
|
parseContext; // type of any
|
|
});
|
|
|
|
const definition: BPMNModdle.Definitions = {} as any;
|
|
|
|
// Expect type of process or undefined
|
|
const maybeProcess = definition.rootElements.find(
|
|
i => i.$type === "bpmn:Process"
|
|
);
|
|
|
|
// Expect process to have additional typings to base element1
|
|
const process = maybeProcess as BPMNModdle.Process;
|