Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BenReim opened this issue Mar 4, 2024 · 0 comments
Labels
ts-interface-generator Related to the ts-interface-generator sub-package

Comments

@BenReim
Copy link

BenReim commented Mar 4, 2024

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)
@akudev akudev added the ts-interface-generator Related to the ts-interface-generator sub-package label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ts-interface-generator Related to the ts-interface-generator sub-package
Projects
None yet
Development

No branches or pull requests

2 participants