Skip to content

Commit a85c73d

Browse files
committed
docs(action-sheet): fix type errors
1 parent 6c96011 commit a85c73d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

static/usage/v7/action-sheet/role-info-on-dismiss/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 { IonActionSheet, IonButton } from '@ionic/angular/standalone';
4+
import type { OverlayEventDetail } from '@ionic/core';
45

56
@Component({
67
selector: 'app-example',
@@ -34,7 +35,8 @@ export class ExampleComponent {
3435

3536
constructor() {}
3637

37-
logResult(ev) {
38+
logResult(event: Event) {
39+
const ev = event as CustomEvent<OverlayEventDetail<string>>;
3840
console.log(JSON.stringify(ev.detail, null, 2));
3941
}
4042
}

static/usage/v8/action-sheet/role-info-on-dismiss/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 { IonActionSheet, IonButton } from '@ionic/angular/standalone';
4+
import type { OverlayEventDetail } from '@ionic/core';
45

56
@Component({
67
selector: 'app-example',
@@ -34,7 +35,8 @@ export class ExampleComponent {
3435

3536
constructor() {}
3637

37-
logResult(ev) {
38+
logResult(event: Event) {
39+
const ev = event as CustomEvent<OverlayEventDetail<string>>;
3840
console.log(JSON.stringify(ev.detail, null, 2));
3941
}
4042
}

0 commit comments

Comments
 (0)