TimelineKit API
    Preparing search index...

    Class Task

    A schedulable item in the Gantt chart. Can be a Task, Milestone, Summary, or Empty row.

    Index

    Constructors

    Properties

    collapsedChanged$: Subject<TaskEventArgs> = ...

    Emitted when the collapsed state of a Summary task changes.

    earlyFinish: Date | null = null

    CPM early finish date.

    earlyStart: Date | null = null

    CPM early start date (computed dynamically when critical path is enabled).

    endTimeChanged$: Subject<TaskEventArgs> = ...

    Emitted when the end time changes.

    freeFloat: number | null = null

    Free float in working hours.

    changed$: Subject<TaskEventArgs> = ...

    Emitted when any property of this task changes.

    isCritical: boolean = false

    Whether this task is on the critical path.

    lateFinish: Date | null = null

    CPM late finish date.

    lateStart: Date | null = null

    CPM late start date.

    resourceAdding$: Subject<TaskResourceAddingEventArgs> = ...

    Emitted before a resource is added to this task.

    startTimeChanged$: Subject<TaskEventArgs> = ...

    Emitted when the start time changes.

    subtaskAdded$: Subject<TaskEventArgs> = ...

    Emitted when a subtask is added to this Summary task.

    totalFloat: number | null = null

    Total float in working hours. Zero means the task is on the critical path.

    typeChanged$: Subject<TaskTypeChangeEventArgs> = ...

    Emitted when the task type changes (e.g. Empty → Task).

    warnings: string[] = []

    Active warning messages for this task (e.g. behind schedule, constraint violations).

    Accessors

    • get baseStartTime(): Date | null

      Original start time before dependency evaluation shifted it. Used for link relaxation.

      Returns Date | null

    • get constraintDate(): Date | null

      Date associated with the scheduling constraint. Null for ASAP/ALAP.

      Returns Date | null

    • set constraintDate(value: Date | null): void

      Parameters

      • value: Date | null

      Returns void

    • get cost(): number | null

      Total cost. Computed from resources and rates, or set manually when no resources are assigned.

      Returns number | null

    • set cost(value: number | null): void

      Parameters

      • value: number | null

      Returns void

    • get customCost(): number | null

      The manually set cost value, or null if cost is computed from resources.

      Returns number | null

    • get hidden(): boolean

      Whether this task is hidden (filtered out or inside a collapsed Summary).

      Returns boolean

    • get id(): string

      Unique identifier (read-only). Auto-generated if not provided in constructor.

      Returns string

    • get isCostEditable(): boolean

      Whether cost can be set manually (only when no resources are assigned).

      Returns boolean

    • get isLengthEditable(): boolean

      Whether the length can be edited (not for multi-part or Summary tasks).

      Returns boolean

    • get isWorkEditable(): boolean

      Whether work can be set manually (only when no resources are assigned).

      Returns boolean

    • get level(): number

      Nesting depth (0 for top-level tasks, 1 for first-level subtasks, etc.).

      Returns number

    • get name(): string | null

      Display name of the task. Setting a name on an Empty row converts it to a Task.

      Returns string | null

    • set name(value: string | null): void

      Parameters

      • value: string | null

      Returns void

    • get progress(): number | null

      Completion percentage (0–100). Null for Empty and Milestone tasks. Computed for Summary tasks.

      Returns number | null

    • set progress(value: number): void

      Parameters

      • value: number

      Returns void

    • get subtasksLength(): number

      Number of direct subtasks (only meaningful for Summary tasks).

      Returns number

    Methods

    • Restore parent/subtask hierarchy from a plain object (must be called after deserializeProperties).

      Parameters

      • source: any
      • allTasks: Task[]

      Returns void

    • Get the value of a custom property by name.

      Parameters

      • name: string

      Returns any

    • Check whether this task is a descendant (at any depth) of the given task.

      Parameters

      Returns boolean

    • Remove a subtask. If no subtasks remain, the Summary reverts to a regular Task.

      Parameters

      Returns void

    • Rename a custom property across this task.

      Parameters

      • oldName: string
      • newName: string

      Returns void

    • Serialize custom properties to a plain array for persistence.

      Returns any[]

    • Set the value of a custom property by name.

      Parameters

      • name: string
      • value: any

      Returns void