fix(all): type issues with TS 3.2

This commit is contained in:
Manu Mtz.-Almeida
2018-12-03 19:48:12 +01:00
committed by Manu MA
parent 63cbc92741
commit aa9d0d4282
5 changed files with 8 additions and 8 deletions

View File

@ -42,7 +42,7 @@ export class Anchor implements ComponentInterface {
return (
<a
href={this.href}
onClick={ev => openURL(this.win, this.href, ev, this.routerDirection)}
onClick={(ev: Event) => openURL(this.win, this.href, ev, this.routerDirection)}
>
<slot></slot>
</a>

View File

@ -79,7 +79,7 @@ export class BackButton implements ComponentInterface {
<button
type="button"
class="button-native"
onClick={ev => this.onClick(ev)}
onClick={(ev: Event) => this.onClick(ev)}
>
<span class="button-inner">
{backButtonIcon && <ion-icon icon={backButtonIcon} lazy={false}></ion-icon>}

View File

@ -421,16 +421,16 @@ export class Datetime implements ComponentInterface {
);
}
private calcMinMax(now?: Date) {
const todaysYear = (now || new Date()).getFullYear();
private calcMinMax() {
const todaysYear = new Date().getFullYear();
if (this.yearValues !== undefined) {
const years = convertToArrayOfNumbers(this.yearValues, 'year');
if (this.min === undefined) {
this.min = Math.min.apply(Math, years);
this.min = Math.min(...years).toString();
}
if (this.max === undefined) {
this.max = Math.max.apply(Math, years);
this.max = Math.max(...years).toString();
}
} else {
if (this.min === undefined) {

View File

@ -122,7 +122,7 @@ export class FabButton implements ComponentInterface {
onFocus={this.onFocus}
onKeyUp={this.onKeyUp}
onBlur={this.onBlur}
onClick={ev => openURL(this.win, this.href, ev, this.routerDirection)}
onClick={(ev: Event) => openURL(this.win, this.href, ev, this.routerDirection)}
>
<span class="close-icon">
<ion-icon name="close" lazy={false}></ion-icon>

View File

@ -99,7 +99,7 @@ export class PickerColumnCmp implements ComponentInterface {
let translateZ = 0;
const { col, rotateFactor } = this;
const selectedIndex = col.selectedIndex = this.indexForY(-y);
const durationStr = (duration === 0) ? null : duration + 'ms';
const durationStr = (duration === 0) ? '' : duration + 'ms';
const scaleStr = `scale(${this.scaleFactor})`;
const children = this.optsEl.children;