Skip to content

[typescript]: Backport DragRegistry fix to 1.x #11387

@benquarmby

Description

@benquarmby

Bug Description

Please backport the DragRegistry import fix implemented in #8677 to the 1.x version. Otherwise consumers see the exact same TypeScript issue reported there:

node_modules/@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegistry.d.ts:1:29 - error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '../../UI5Element.js'?

1 import type UI5Element from "../../UI5Element";

The defect still exists on the latest 1.x release: https://github.com/SAP/ui5-webcomponents/blob/d2ec2b0c0e8cbd759ccc9305f42ef4dea23f542d/packages/base/src/util/dragAndDrop/DragRegistry.ts#L1

It may be possible to workaround this issue with the skipLibCheck option. However, that hides true positive typing errors, and is not recommended.

FYI: @Lukas742, @ilhan007

Affected Component

DragRegistry

Expected Behaviour

TypeScript builds using 1.x do not fail with an error.

Isolated Example

No response

Steps to Reproduce

...

Log Output, Stack Trace or Screenshots

node_modules/@ui5/webcomponents-base/dist/util/dragAndDrop/DragRegistry.d.ts:1:29 - error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '../../UI5Element.js'?

1 import type UI5Element from "../../UI5Element";

Priority

None

UI5 Web Components Version

1.29.19

Browser

Edge

Operating System

No response

Additional Context

No response

Organization

SAP Concur

Declaration

  • I’m not disclosing any internal or sensitive information.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions