From 89831ea2e8938ea6d9218f1f691d1853de84d07a Mon Sep 17 00:00:00 2001 From: Wilt Date: Wed, 12 Feb 2025 15:21:40 +0100 Subject: [PATCH] fix(material/radio): Optional typing of MatRadioChange This event should be typed. Added type and fallback to any to make this optional and backwards compatible. --- src/material/radio/radio.ts | 4 ++-- tools/public_api_guard/material/radio.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/material/radio/radio.ts b/src/material/radio/radio.ts index 99b54821b07d..1478434860eb 100644 --- a/src/material/radio/radio.ts +++ b/src/material/radio/radio.ts @@ -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 { constructor( /** The radio button that emits the change event. */ public source: MatRadioButton, /** The value of the radio button. */ - public value: any, + public value: T, ) {} } diff --git a/tools/public_api_guard/material/radio.md b/tools/public_api_guard/material/radio.md index 4a469a7294b6..0c9ca0a8bdd7 100644 --- a/tools/public_api_guard/material/radio.md +++ b/tools/public_api_guard/material/radio.md @@ -97,12 +97,12 @@ export class MatRadioButton implements OnInit, AfterViewInit, DoCheck, OnDestroy } // @public -export class MatRadioChange { +export class MatRadioChange { constructor( source: MatRadioButton, - value: any); + value: T); source: MatRadioButton; - value: any; + value: T; } // @public (undocumented)