bug(MENU): Types of property 'hasBackdrop' are incompatible
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### Is this a regression?
- [X] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
Definitely worked in 12.2.9, didn't check with later versions
### Description
On version 13.1.0 with `exactOptionalPropertyTypes` flag,
when trying to use the Menu component, following error shows up in Terminal:

### Reproduction
StackBlitz Example project doesn't build on latest version, so I couldn't reproduce it for you. You can see it working on v12: https://stackblitz.com/edit/components-issue-fau7sh?file=src%2Fapp%2Fexample-component.html.
To check locally, create a new Angular 13 project, install the material library and enable the `exactOptionalPropertyTypes` flag in `tsconfig.json`
### Expected Behavior
Code compiles and Menu works.
### Actual Behavior
Code doesn't compile, Menu doesn't work.
### Environment
- Angular: 13.1.0
- CDK/Material: 13.1.0
- Browser(s): Chrome 96
- Operating System: Windows 11
If you guys have any questions, let me know
Beitragsleitfaden
Rechercherichtung
Beginne damit, das im Issue beschriebene Angular-13-Projekt zu erstellen, exactOptionalPropertyTypes in tsconfig.json zu aktivieren und die Menu-Komponente zu verwenden. Vergleiche den Typfehler mit Version 12.2.9 und untersuche die beteiligten, mit Menu zusammenhängenden Typdefinitionen. Als erledigt gilt die Aufgabe, wenn das Projekt kompiliert und Menu bei aktiviertem Flag funktioniert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100