bug(MENU): Types of property 'hasBackdrop' are incompatible
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia creando il progetto Angular 13 descritto nell'issue, abilitando exactOptionalPropertyTypes in tsconfig.json e utilizzando il componente Menu. Confronta l'errore di tipo con la versione 12.2.9 e ispeziona le definizioni dei tipi coinvolte relative a Menu. Il lavoro è completato quando il progetto compila e Menu funziona con il flag abilitato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100