mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(all): type issues with TS 3.2
This commit is contained in:

committed by
Manu MA

parent
63cbc92741
commit
aa9d0d4282
@ -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>
|
||||
|
@ -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>}
|
||||
|
@ -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) {
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user