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

Offen
#431 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
typescript
Bereich
tooling

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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)
Vorherrschende Sprache
TypeScript
Sterne
213
Forks
35
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus UI5/typescript

Alle Issues in UI5/typescript

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.