MatDialog `open` method `R` generic is too loose
Open
area: material/dialog
P4
refactoring
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
Because the `R` generic on `MatDialog.open` isn't constrained by arguments to the function, it's effectively always `any`. We should remove the method generic and change the return generic to `{}`, which will force people to explicitly state which type it is when consuming it.
Contributor guide
Research direction
Start by locating the MatDialog.open method declaration and inspect how its R generic is defined and returned. Update the generic typing as described, then verify that dialog result consumers must explicitly provide their intended type and that existing TypeScript checks still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100