Skip to content

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

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

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