dts: `typeof X` references in ɵmod / hostDirectives use local names with no import (TS2304 in published .d.ts)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust, typescript
- Ambito
- backend-api-design, build-system
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 245
- Fork
- 26
- Merge medio
- 1g 42m
- PR unite (30g)
- 83
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di voidzero-dev/oxc-angular-compiler
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
voidzero-dev/oxc-angular-compiler#686 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
voidzero-dev/oxc-angular-compiler#694 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
voidzero-dev/oxc-angular-compiler#693 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
voidzero-dev/oxc-angular-compiler#691 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
voidzero-dev/oxc-angular-compiler#690 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di voidzero-dev/oxc-angular-compiler
Issue simili
-
bug good first issue help wanted linux macos testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
area: app type: test
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
storytold/photocraft#12706 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
IngvarConsulting/unica#2822 ·
I maintainer di solito rispondono entro 1 giorno