Skip to content

@sapui5/types: sap/gantt/simple/DeltaLine is missing the settings constructor overload #625

Open

Description

@edemuck

Summary

The TypeScript definition for sap/gantt/simple/DeltaLine in @sapui5/types appears to be incomplete.

At runtime, DeltaLine supports being created with a settings object, but the current type definition only exposes constructor(sId?: string).

This breaks TSX / JSX scenarios and also plain TypeScript code that instantiates DeltaLine with settings.

Affected Package

  • @sapui5/types: ~1.142.13

Affected UI5 Class

  • sap/gantt/simple/DeltaLine

Current Typing

declare module "sap/gantt/simple/DeltaLine" {
  export default class DeltaLine extends UI5Element {
    constructor(sId?: string);
  }
}

Expected Typing

declare module "sap/gantt/simple/DeltaLine" {
  export default class DeltaLine extends UI5Element {
    constructor(settings?: $DeltaLineSettings);
    constructor(id?: string, settings?: $DeltaLineSettings);
  }
}

Actual Behaviour

TypeScript rejects valid code like this:

import DeltaLine from "sap/gantt/simple/DeltaLine";

const deltaLine = new DeltaLine({
  stroke: "red",
  timeStamp: "2026-01-01T00:00:00",
  endTimeStamp: "2026-01-01T12:00:00",
  visibleDeltaStartEndLines: false,
});

Expected Behaviour

The code above should type-check, because DeltaLine accepts a settings object at runtime.

Why This Matters

  • It forces local type workarounds or wrapper classes.
  • It breaks UI5 JSX/TSX runtimes that derive prop types from UI5 constructor signatures.
  • It is inconsistent with the exported $DeltaLineSettings interface, which already exists.

Reproduction

  1. Install @sapui5/types@~1.142.13
  2. Create a TypeScript file with the example above
  3. Run TypeScript type-checking
  4. Observe that the constructor signature does not accept the settings object

Environment

  • TypeScript: project using strict mode
  • UI5 typings: @sapui5/types@~1.142.13
  • UI5 runtime used in app: 1.142.13

Suggested Fix

Please add the missing settings-based constructor overloads for sap/gantt/simple/DeltaLine.

The class already exports $DeltaLineSettings, so the constructor typing likely only needs to be aligned with the actual runtime API.

Additional Context

In our project we had to introduce a local wrapper around sap/gantt/simple/DeltaLine only to bridge the missing constructor typing. The runtime API itself works correctly; the issue is limited to the TypeScript declaration.

Activity

  1. codeworrior commented on Sep 14, 2026

    @codeworrior
    Member

    That's due to an incomplete JSDoc in DeltaLine:

    		/**
    		 * Creates and initializes a new DeltaLine class.
    		 *
    		 * @param {string} [sId] ID of the new control, generated automatically if no ID is given.
    		 *
    		 * @class
    		 * The DeltaLine class contains properties to draw additional vertical lines which are connected by DeltaMarkers
    		 * at specific time points in the chart area.
    		 *

    Only the ID parameter is documented, not the settings. I'll let the colleagues know so that they can fix it.

  2. codeworrior commented on Sep 14, 2026

    @codeworrior
    Member

    A fix has been submitted for

    • sap/gantt/overlays/GanttRowOverlay.js
    • sap/gantt/simple/BaseTriangle.js
    • sap/gantt/simple/DeltaLine.js

    which all suffered from the same issue.
    Documentation fixes usually only go into the next monthly release (1.153), I hope that's okay.

  3. edemuck commented on Sep 14, 2026

    @edemuck
    Author

    The same issue exists on sap.gantt.simple.GanttChartWithTable. The constructor mSetting is from type object, instead of $GanttChartWithTableSettings. And the second constructor with only parameter mSetting isn't available. There are more jsDoc gaps of other controls/elements (e.g. sap/gantt/simple/GanttRowSettings).

  4. codeworrior commented on Sep 14, 2026

    @codeworrior
    Member

    The same issue exists on sap.gantt.simple.GanttChartWithTable. The constructor mSetting is from type object, instead of $GanttChartWithTableSettings. And the second constructor with only parameter mSetting isn't available. There are more jsDoc gaps of other controls/elements (e.g. sap/gantt/simple/GanttRowSettings).

    That looks same, but in fact is slightly different. The dts-generator expects the parameter to be named /settings/, but GanttChartWithTable documented it as mSetting (singular).

    I didn't know about this special problem, but when searching for the missing mSettings documentation, I found several mSetting and changed them to mSettings (just to be more precise, it's not a single setting). Luckily, this should fix the GanttChartWithTable issue already.

    Affected APIs:

    • sap/gantt/layouts/SidePanel.js
    • sap/gantt/overlays/Overlay.js
    • sap/gantt/simple/BaseChevron.js
    • sap/gantt/simple/BaseDiamond.js
    • sap/gantt/simple/ContainerToolbar.js
    • sap/gantt/simple/GanttAdaptationData.js
    • sap/gantt/simple/GanttChartWithTable.js
    • sap/gantt/simple/GanttHeader.js
    • sap/gantt/simple/GanttPrinting.js
    • sap/gantt/simple/GanttRowAction.js
    • sap/gantt/simple/GanttRowSettings.js
    • sap/gantt/simple/InnerGanttChart.js
    • sap/gantt/simple/MultiActivityRowSettings.js
    • sap/gantt/simple/Relationship.js
    • sap/gantt/simple/shapes/Shape.js
    • sap/gantt/simple/shapes/Task.js
    • sap/gantt/skipTime/DayInterval.js
    • sap/gantt/skipTime/SkipInterval.js
    • sap/gantt/skipTime/SkipPattern.js
    • sap/gantt/skipTime/WeekPattern.js

    I also found at least one that named the parameter mAttributes (BaseDeltaRectangle). As I wasn't aware of the special check in the dts-generator (or didn't remember), I did not fix this one. Will do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions