Skip to content

[ts-interface-generator] Generate fully qualified module names in interface for seamless use with tsc declarations #431

@BenReim

Description

@BenReim

Description:
The current behavior of the @ui5/ts-interface-generator package generates interface declarations with relative module names. This leads to issues when attempting to use these interfaces alongside declarations generated by tsc, as relative paths cannot be resolved in such scenarios.

Desired Behavior:
It would be desired that the generated interfaces can be used and placed along with declarations generated by tsc (perhaps by using fully qualified module names)

Note: The tooling task ui5-transpile-task already transforms the generated interfaces accordingly, but it would be nice if one can use the native tsc cli for the type generation as well.

A workflow to generate declarations for a TS-based ui5 library project could be:

  1. Generate declarations for TS files
tsc --emitDeclarationOnly --declarationMap --outFile index.d.ts
  1. Copy over the generated interfaces (*.gen.d.ts) in a post build step (tsc output generation does not consider d.ts)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ts-interface-generatorRelated to the ts-interface-generator sub-package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions