feat(all): add optional generics typings for overlay component methods (#21393)

This commit is contained in:
Alexey Vinogradov
2020-06-03 20:08:27 +07:00
committed by GitHub
parent c7e94a1f23
commit 5bf83b80d7
16 changed files with 70 additions and 70 deletions

View File

@ -137,7 +137,7 @@ export class Picker implements ComponentInterface, OverlayInterface {
* Returns a promise that resolves when the picker did dismiss.
*/
@Method()
onDidDismiss(): Promise<OverlayEventDetail> {
onDidDismiss<T = any>(): Promise<OverlayEventDetail<T>> {
return eventMethod(this.el, 'ionPickerDidDismiss');
}
@ -145,7 +145,7 @@ export class Picker implements ComponentInterface, OverlayInterface {
* Returns a promise that resolves when the picker will dismiss.
*/
@Method()
onWillDismiss(): Promise<OverlayEventDetail> {
onWillDismiss<T = any>(): Promise<OverlayEventDetail<T>> {
return eventMethod(this.el, 'ionPickerWillDismiss');
}