bug(MENU): Types of property 'hasBackdrop' are incompatible
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tạo dự án Angular 13 được mô tả trong issue, bật exactOptionalPropertyTypes trong tsconfig.json và sử dụng component Menu. So sánh lỗi kiểu với phiên bản 12.2.9 và kiểm tra các định nghĩa kiểu liên quan đến Menu có liên quan. Hoàn thành khi dự án biên dịch được và Menu hoạt động khi flag được bật.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100