You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(snack-bar,bottom-sheet): Idiomatic configuration not compatible with new ESLint strict type-checked rule #34151
Idiomatic configuration of Snackbars or Bottom Sheets (and maybe other components) is achieved (and documented) with the use of a last parameter that falls into that case, because MatSnackBarConfig, MatBottomSheetConfig, etc. are defined as class instead of interface.
As a consequence, a simple project with Material Angular + Typescript-ESLint project with strict type-checked linting enabled reports an error where using the components with the configuration parameter:
snackBar.open('Message archived','Undo',{duration: 3000}// Lint error: This object literal is used where an instance of class `MatSnackBarConfig<any>` is expected.);
There's no good reason for them to be classes, but changing them at this point will be breaking. For cases like this we can make it so you can do something like this:
Activity
crisbeto commentedon Nov 27, 2026
There's no good reason for them to be classes, but changing them at this point will be breaking. For cases like this we can make it so you can do something like this: