feat(all): add CustomEvents types to components that emit events (#23956)

resolves #22925

BREAKING CHANGE: The `RadioChangeEventDetail` interface has been removed in favor of `RadioGroupChangeEventDetail`.
This commit is contained in:
Liam DeBeasi
2021-09-24 16:28:49 -04:00
committed by GitHub
parent 285a371101
commit 8708095111
48 changed files with 761 additions and 56 deletions

View File

@ -9,6 +9,19 @@ Both `ion-tabs` and `ion-tab-bar` can be used as standalone elements. They don
The `ion-tab-bar` needs a slot defined in order to be projected to the right place in an `ion-tabs` component.
## Interfaces
### TabsCustomEvent
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.
```typescript
interface TabsCustomEvent extends CustomEvent {
detail: { tab: string };
target: HTMLIonTabsElement;
}
```
<!-- Auto Generated Below -->

View File

@ -0,0 +1,4 @@
export interface TabsCustomEvent extends CustomEvent {
detail: { tab: string };
target: HTMLIonTabsElement;
}