UI5 / UI5/typescript

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

Open Beginner friendly
#625 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
213
Forks
35
Avg merge
37m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the @sapui5/types declaration for sap/gantt/simple/DeltaLine and compare its constructors with neighboring UI5 classes and the existing $DeltaLineSettings interface. Add the two settings-based overloads described in the issue, then run the TypeScript reproduction or project type-check to verify that the shown instantiation is accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.