Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional typing of MatRadioChange #30477

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/material/radio/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ import {Subscription} from 'rxjs';
import {_CdkPrivateStyleLoader} from '@angular/cdk/private';

/** Change event object emitted by radio button and radio group. */
export class MatRadioChange {
export class MatRadioChange<T = any> {
constructor(
/** The radio button that emits the change event. */
public source: MatRadioButton,
/** The value of the radio button. */
public value: any,
public value: T,
) {}
}

Expand Down
6 changes: 3 additions & 3 deletions tools/public_api_guard/material/radio.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ export class MatRadioButton implements OnInit, AfterViewInit, DoCheck, OnDestroy
}

// @public
export class MatRadioChange {
export class MatRadioChange<T = any> {
constructor(
source: MatRadioButton,
value: any);
value: T);
source: MatRadioButton;
value: any;
value: T;
}

// @public (undocumented)
Expand Down
Loading