Skip to content

Commit

Permalink
Optional typing of MatSelectChange
Browse files Browse the repository at this point in the history
This event should be typed. Added type and fallback to any to make this optional and backwards compatible.
  • Loading branch information
Wilt authored Jan 14, 2025
1 parent f9a9db6 commit 1ee2004
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/material/select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ export const MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {
export const MAT_SELECT_TRIGGER = new InjectionToken<MatSelectTrigger>('MatSelectTrigger');

/** Change event object that is emitted when the select value has changed. */
export class MatSelectChange {
export class MatSelectChange<T = any> {
constructor(
/** Reference to the select that emitted the change event. */
public source: MatSelect,
/** Current value of the select that emitted the event. */
public value: any,
public value: T,
) {}
}

Expand Down

0 comments on commit 1ee2004

Please sign in to comment.