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

Open
#431 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
tooling

Research direction

Start with the @ui5/ts-interface-generator package and compare its generated interface declarations with declarations emitted by the tsc workflow described in the issue. Verify the result by placing the generated *.gen.d.ts files alongside tsc output and confirming that native tsc can resolve the module names without ui5-transpile-task.

Written by the indexing model from the issue text.

Description

ts-interface-generator

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)
Dominant language
TypeScript
Stars
213
Forks
35
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from UI5/typescript

All issues in UI5/typescript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.