dts: `typeof X` references in ɵmod / hostDirectives use local names with no import (TS2304 in published .d.ts)
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- rust, typescript
- Domínio
- backend-api-design, build-system
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Rust
- Estrelas
- 245
- Forks
- 26
- Merge médio
- 1d 42min
- PRs com merge (30d)
- 83
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de voidzero-dev/oxc-angular-compiler
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
voidzero-dev/oxc-angular-compiler#686 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
voidzero-dev/oxc-angular-compiler#694 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
voidzero-dev/oxc-angular-compiler#693 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 43/100
voidzero-dev/oxc-angular-compiler#691 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
voidzero-dev/oxc-angular-compiler#690 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de voidzero-dev/oxc-angular-compiler
Issues semelhantes
-
bug good first issue help wanted linux macos testing
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
area: app type: test
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
bug priority: medium
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
storytold/photocraft#12706 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug priority-low to-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
examples/dca and limit-order: swap always fails on the real Soroswap router (deadline equals now)Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
sorocon-labs/sorocron#172 ·
Mantenedores costumam responder em até 1 dia