The type of the optional data property. Defaults to never,
which omits the data property from the type. Specify a concrete type to enable
compile-time-checked task data in both input and callback payloads.
// Default: no `data` property
const task: Task = { id: 1, text: 'Build', startDate: '2026-01-01', endDate: '2026-01-03', kind: 'task' };
// With typed data
interface TaskMeta { priority: number; label: string }
const typedTask: Task<TaskMeta> = {
id: 1, text: 'Build', startDate: '2026-01-01', endDate: '2026-01-03',
kind: 'task', data: { priority: 1, label: 'critical' }
};
A task in the Gantt chart — discriminated by
kindinto leaf tasks, summary projects, and milestones.