fix(all): strong typed events

This commit is contained in:
Manu Mtz.-Almeida
2018-04-23 17:26:10 +02:00
parent b8c87c453a
commit d5129df970
44 changed files with 434 additions and 607 deletions

View File

@ -1,5 +1,6 @@
import { Component, Element, Event, EventEmitter, Listen, Prop, Watch } from '@stencil/core';
import { Mode } from '../..';
import { InputChangeEvent } from '../../utils/input-interfaces';
@Component({
@ -47,9 +48,9 @@ export class Segment {
/**
* Emitted when the value property has changed.
*/
@Event() ionChange!: EventEmitter;
@Event() ionChange!: EventEmitter<InputChangeEvent>;
@Listen('ionClick')
@Listen('ionSelect')
segmentClick(ev: CustomEvent) {
const selectedButton = ev.target as HTMLIonSegmentButtonElement;
this.value = selectedButton.value;