The DayPilot.Task constructor creates a Gantt task object from a raw data item.
new DayPilot.Task(data)data (object) - raw task data with init properties
The supplied object is stored unchanged as the DayPilot.Task.data property.
const task = new DayPilot.Task({
id: DayPilot.guid(),
start: DayPilot.Date.today(),
end: DayPilot.Date.today().addHours(5),
text: "New Task"
});