Template type checking re-builds do not run correctly when referencing a re-exported type
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- angular, typescript
- Área
- build-system
Línea de trabajo
Comienza con la reproducción mínima enlazada y ejecuta ng serve con la comprobación de tipos de plantillas habilitada en las versiones de Angular y Node indicadas. Cambia MyType entre las definiciones abc y abcd y, a continuación, inspecciona las rutas de reconstrucción de Angular CLI y de comprobación de tipos de plantillas. Se considera terminado cuando revertir la definición de tipo elimina el error de la plantilla durante la reconstrucción.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
Yes
Description
Consider the following example, running ng serve with template type checking turned on:
- An Angular template references a property on the component class in an expression.
- This component class properties type definition comes from a file which re-exports the type definition from another file.
- Re-builds do not always re-compile the template expression when they should.
More specifically, in the reproduction repo this looks as follows:
- The app component template includes an expression:
{{ myType?.abc }}. - The app component class defines the myType property:
myType?: MyTypeReExported. - The type of the myType property comes from a file which re-exports another type.
export type MyTypeRexported = MyType. - The type MyType comes from a file which defines the definition as:
export interface MyType { abc: 123; }. - The initial ng serve will run without errors.
- Changing the type definition of MyType to be
export interface MyType { abcd: 123; }causes an error in the app component's template. This is seen in the re-build console output. This is the correct behaviour. - Changing the type definition back to what it was originally should remove the error. However, it does not. That is the bug.
Please provide a link to a minimal reproduction of the bug
https://github.com/HazzMan2409/angular-template-rebuild-bug
Please provide the environment you discovered this bug in
Angular 12.2.5.
Node 14.17.6
See the package.json on the repo for more details. At the time 12.2.5 was the latest version.
- Lenguaje dominante
- TypeScript
- Estrellas
- 27k
- Forks
- 11.8k
- Merge medio
- 16 h 35 min
- PR fusionados (30 d)
- 176
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de angular/angular-cli
-
Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-server Abiertoarea: @angular/build gemini-triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
angular/angular-cli#33055 · 1 comentario · 3 reacciones ·
-
unit-test: with --coverage, a setup file's hooks reach only the first spec file of each worker Abiertoarea: @angular/build gemini-triaged
Dificultad 4/5 3-5 días Aptitud para principiantes 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 asignado ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 asignado ·
Todos los issues de angular/angular-cli
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
vicharanashala/fln#563 ·