Skip to content

Commit 953301a

Browse files
committed
docs(alert): fix type errors
1 parent a7fbf84 commit 953301a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

static/usage/v7/alert/buttons/angular/example_component_ts.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
```ts
22
import { Component } from '@angular/core';
33
import { IonAlert, IonButton } from '@ionic/angular/standalone';
4+
import type { OverlayEventDetail } from '@ionic/core';
45

56
@Component({
67
selector: 'app-example',
@@ -25,7 +26,8 @@ export class ExampleComponent {
2526
},
2627
];
2728

28-
setResult(ev) {
29+
setResult(event: Event) {
30+
const ev = event as CustomEvent<OverlayEventDetail<string>>;
2931
console.log(`Dismissed with role: ${ev.detail.role}`);
3032
}
3133
}

static/usage/v8/alert/buttons/angular/example_component_ts.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
```ts
22
import { Component } from '@angular/core';
33
import { IonAlert, IonButton } from '@ionic/angular/standalone';
4+
import type { OverlayEventDetail } from '@ionic/core';
45

56
@Component({
67
selector: 'app-example',
@@ -25,7 +26,8 @@ export class ExampleComponent {
2526
},
2627
];
2728

28-
setResult(ev) {
29+
setResult(event: Event) {
30+
const ev = event as CustomEvent<OverlayEventDetail<string>>;
2931
console.log(`Dismissed with role: ${ev.detail.role}`);
3032
}
3133
}

0 commit comments

Comments
 (0)