If you are using typescript, then you are in luck! The library is built in typescript, and includes advanced types for everything you need right out of the box.
Lets start by including the things we are going to need:
// link them and add a label to the linkconstlink=port1.link<DefaultLinkModel>(port2);link.addLabel('Hello World!');
Great! Now we have setup a simple diagram. All thats left to do, is create a DiagramModel to contain everything, add all the elements to it, and then add it to the engine.