The DayPilot.Link constructor creates a link object from a data item.
new DayPilot.Link(data)data (object) - link data with the link properties.
The structure of the data object is described in the DayPilot.Link.data property.
The data object can define fields such as id, from, to, and type, as shown in the example below.
const link = new DayPilot.Link({
id: "link-1",
from: "task-1",
to: "task-2",
type: "FinishToStart"
});