dts: `typeof X` references in ɵmod / hostDirectives use local names with no import (TS2304 in published .d.ts)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust, typescript
- Bereich
- backend-api-design, build-system
Rechercherichtung
Start in dts.rs at the formatter locations listed in the issue: lines 392, 406, 420, 720, and 769. Trace how declarations are generated for ɵmod members and hostDirectives, then check the bundled and unbundled examples against the emitted .d.ts files. Done means referenced classes, including aliased host directives, resolve for consumers without skipLibCheck; add or run focused declaration emit tests for those cases.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Found while reviewing #683. The member text comes from the compiler (dts.rs), so both the asset and chunk paths ship it.
ngtsc writes references to other classes in .d.ts members as typeof i1.X with import * as i1 from "./x". Oxc writes the local name with no import: format!("typeof {}", …) at dts.rs:392/406/420 (ɵmod declarations / imports / exports) and dts.rs:720/769 (hostDirectives). The name only resolves if that class happens to be declared in the same .d.ts under the same name. Declaration emit drops imports only used by decorators, so it often isn't.
A. bundled (rolldown-plugin-dts), index.ts exports only LibModule
static ɵmod: i0.ɵɵNgModuleDeclaration<LibModule, never, [typeof InternalComponent], [typeof InternalComponent]>;
→ InternalComponent is not declared in index.d.ts → consumer tsc: TS2304 Cannot find name 'InternalComponent'
B. tsdown unbundle: true
lib.module.d.mts: [typeof HelloComponent, typeof HighlightDirective], no import of either → 4× TS2304
C. aliased host directive: import { HighlightDirective as HD } …; hostDirectives: [{ directive: HD }]
[{ directive: typeof HD; … }] → no `HD` in the emitted .d.ts → TS2304 (or `any` with skipLibCheck)
With skipLibCheck: true the errors go away, but the types become any, so the consumer's Angular compiler can't see the module's exported components.
- Vorherrschende Sprache
- Rust
- Sterne
- 245
- Forks
- 26
- Ø Merge
- 1 T. 42 Min.
- Gemergte PRs (30 T.)
- 83
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus voidzero-dev/oxc-angular-compiler
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
voidzero-dev/oxc-angular-compiler#686 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
voidzero-dev/oxc-angular-compiler#694 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
voidzero-dev/oxc-angular-compiler#693 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 43/100
voidzero-dev/oxc-angular-compiler#691 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
voidzero-dev/oxc-angular-compiler#690 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in voidzero-dev/oxc-angular-compiler
Ähnliche Issues
-
bug good first issue help wanted linux macos testing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
area: app type: test
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug priority: medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
storytold/photocraft#12706 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug priority-low to-agent
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
examples/dca and limit-order: swap always fails on the real Soroswap router (deadline equals now)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
sorocon-labs/sorocron#172 ·
Maintainer antworten meist innerhalb von 1 Tag