mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
New typings for bpmn-moddle (#27005)
* 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
This commit is contained in:
parent
2dd2e60a64
commit
e5c9bcdaea
24
types/bpmn-moddle/bpmn-moddle-tests.ts
Normal file
24
types/bpmn-moddle/bpmn-moddle-tests.ts
Normal file
@ -0,0 +1,24 @@
|
||||
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;
|
||||
1068
types/bpmn-moddle/index.d.ts
vendored
Normal file
1068
types/bpmn-moddle/index.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16
types/bpmn-moddle/tsconfig.json
Normal file
16
types/bpmn-moddle/tsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "bpmn-moddle-tests.ts"]
|
||||
}
|
||||
1
types/bpmn-moddle/tslint.json
Normal file
1
types/bpmn-moddle/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user