gantt-renderer
    Preparing search index...

    Function validateLinkRefs

    • Validates that every link references existing task IDs and that no duplicate (source, target) pairs exist.

      Parameters

      • tasks: (
            | {
                color?: string;
                data?: Record<string, unknown>;
                endDate: string;
                id: number;
                kind: "task";
                parent?: number;
                percentComplete: number;
                readonly?: boolean;
                startDate: string;
                text: string;
            }
            | {
                color?: string;
                data?: Record<string, unknown>;
                endDate: string;
                id: number;
                kind: "project";
                open: boolean;
                parent?: number;
                percentComplete: number;
                readonly?: boolean;
                startDate: string;
                text: string;
            }
            | {
                color?: string;
                data?: Record<string, unknown>;
                id: number;
                kind: "milestone";
                parent?: number;
                readonly?: boolean;
                startDate: string;
                text: string;
            }
        )[]

        The task list (used as the reference set of valid IDs).

        • {
              color?: string;
              data?: Record<string, unknown>;
              endDate: string;
              id: number;
              kind: "task";
              parent?: number;
              percentComplete: number;
              readonly?: boolean;
              startDate: string;
              text: string;
          }
          • Optionalcolor?: string

            Optional CSS color value for the task bar. Overrides the default color assignment.

          • Optionaldata?: Record<string, unknown>

            Optional arbitrary metadata for consumer use. Preserved in the parsed output.

          • endDate: string

            ISO date: YYYY-MM-DD

          • id: number

            Unique positive integer identifier for the task.

          • kind: "task"
          • Optionalparent?: number

            Optional id of the parent task. When set, this task is a child in the hierarchy.

          • percentComplete: number

            0–100 completion percentage (integer).

          • Optionalreadonly?: boolean

            When true, the task bar cannot be dragged or resized.

          • startDate: string

            ISO date: YYYY-MM-DD

          • text: string

            Display name / label of the task.

        • {
              color?: string;
              data?: Record<string, unknown>;
              endDate: string;
              id: number;
              kind: "project";
              open: boolean;
              parent?: number;
              percentComplete: number;
              readonly?: boolean;
              startDate: string;
              text: string;
          }
          • Optionalcolor?: string

            Optional CSS color value for the task bar. Overrides the default color assignment.

          • Optionaldata?: Record<string, unknown>

            Optional arbitrary metadata for consumer use. Preserved in the parsed output.

          • endDate: string

            ISO date: YYYY-MM-DD

          • id: number

            Unique positive integer identifier for the task.

          • kind: "project"
          • open: boolean

            Initial expanded state for tree hierarchy. When false, children of this task are hidden on initial render.

            true
            
          • Optionalparent?: number

            Optional id of the parent task. When set, this task is a child in the hierarchy.

          • percentComplete: number

            0–100 completion percentage (integer).

          • Optionalreadonly?: boolean

            When true, the task bar cannot be dragged or resized.

          • startDate: string

            ISO date: YYYY-MM-DD

          • text: string

            Display name / label of the task.

        • {
              color?: string;
              data?: Record<string, unknown>;
              id: number;
              kind: "milestone";
              parent?: number;
              readonly?: boolean;
              startDate: string;
              text: string;
          }
          • Optionalcolor?: string

            Optional CSS color value for the task bar. Overrides the default color assignment.

          • Optionaldata?: Record<string, unknown>

            Optional arbitrary metadata for consumer use. Preserved in the parsed output.

          • id: number

            Unique positive integer identifier for the task.

          • kind: "milestone"
          • Optionalparent?: number

            Optional id of the parent task. When set, this task is a child in the hierarchy.

          • Optionalreadonly?: boolean

            When true, the task bar cannot be dragged or resized.

          • startDate: string

            ISO date: YYYY-MM-DD

          • text: string

            Display name / label of the task.

      • links: {
            data?: Record<string, unknown>;
            id: number;
            readonly?: boolean;
            source: number;
            target: number;
            type: "FS" | "SS" | "FF" | "SF";
        }[]

        The dependency links to validate.

        • Optionaldata?: Record<string, unknown>

          Optional arbitrary metadata for consumer use. Preserved in the parsed output.

        • id: number

          Unique positive integer identifier for the dependency link.

        • Optionalreadonly?: boolean

          When true, the link cannot be modified or deleted through the UI.

        • source: number

          The id of the predecessor task (the task that drives the dependency).

        • target: number

          The id of the successor task (the task that depends on the predecessor).

        • type: "FS" | "SS" | "FF" | "SF"

          Dependency type.

          • 'FS' — Finish-to-start: successor starts after predecessor finishes.
          • 'SS' — Start-to-start: successor starts at the same time as predecessor.
          • 'FF' — Finish-to-finish: successor finishes at the same time as predecessor.
          • 'SF' — Start-to-finish: successor finishes after predecessor starts.
          'FS'
          

      Returns void

      When any link references a non-existent source or target task, when a non-FS link connects to/from a milestone, or when duplicate (source, target) pairs exist.