bug(MENU): Types of property 'hasBackdrop' are incompatible
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### 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
コントリビューションガイド
調査の方向性
まず、issue に記載されている Angular 13 プロジェクトを作成し、tsconfig.json で exactOptionalPropertyTypes を有効にして、Menu コンポーネントを使用します。バージョン 12.2.9 と型エラーを比較し、関連する Menu の型定義を調べます。プロジェクトがコンパイルされ、flag を有効にした状態で Menu が動作すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100