Skip to content

Commit

Permalink
fix(all): updated tslint rules to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jul 29, 2018
1 parent d1969bd commit 92e21a8
Show file tree
Hide file tree
Showing 112 changed files with 548 additions and 576 deletions.
4 changes: 2 additions & 2 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5923,7 +5923,7 @@ declare global {
/**
* Scroll by a specified X/Y distance in the component
*/
'scrollByPoint': (x: number, y: number, duration: number, done?: Function | undefined) => Promise<any>;
'scrollByPoint': (x: number, y: number, duration: number) => Promise<any>;
/**
* If true, the component will emit scroll events.
*/
Expand All @@ -5935,7 +5935,7 @@ declare global {
/**
* Scroll to a specified X/Y location in the component
*/
'scrollToPoint': (x: number, y: number, duration: number, done?: Function | undefined) => Promise<any>;
'scrollToPoint': (x: number, y: number, duration: number) => Promise<void>;
/**
* Scroll to the top of the component
*/
Expand Down
10 changes: 5 additions & 5 deletions core/src/components/action-sheet/action-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,22 @@ export class ActionSheet implements OverlayInterface {
/**
* Emitted after the alert has presented.
*/
@Event({eventName: 'ionActionSheetDidPresent'}) didPresent!: EventEmitter<void>;
@Event({ eventName: 'ionActionSheetDidPresent' }) didPresent!: EventEmitter<void>;

/**
* Emitted before the alert has presented.
*/
@Event({eventName: 'ionActionSheetWillPresent'}) willPresent!: EventEmitter<void>;
@Event({ eventName: 'ionActionSheetWillPresent' }) willPresent!: EventEmitter<void>;

/**
* Emitted before the alert has dismissed.
*/
@Event({eventName: 'ionActionSheetWillDismiss'}) willDismiss!: EventEmitter<OverlayEventDetail>;
@Event({ eventName: 'ionActionSheetWillDismiss' }) willDismiss!: EventEmitter<OverlayEventDetail>;

/**
* Emitted after the alert has dismissed.
*/
@Event({eventName: 'ionActionSheetDidDismiss'}) didDismiss!: EventEmitter<OverlayEventDetail>;
@Event({ eventName: 'ionActionSheetDidDismiss' }) didDismiss!: EventEmitter<OverlayEventDetail>;


componentDidLoad() {
Expand Down Expand Up @@ -186,7 +186,7 @@ export class ActionSheet implements OverlayInterface {
}
}

private callButtonHandler(button: ActionSheetButton|undefined): boolean {
private callButtonHandler(button: ActionSheetButton | undefined): boolean {
if (button && button.handler) {
// a handler has been provided, execute it
// pass the handler the values from the inputs
Expand Down
8 changes: 4 additions & 4 deletions core/src/components/action-sheet/animations/ios.enter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* iOS Action Sheet Enter Animation
*/
export function iosEnterAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function iosEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.4);
Expand Down
8 changes: 4 additions & 4 deletions core/src/components/action-sheet/animations/ios.leave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* iOS Action Sheet Leave Animation
*/
export function iosLeaveAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function iosLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper'));

backdropAnimation.fromTo('opacity', 0.4, 0);
Expand Down
8 changes: 4 additions & 4 deletions core/src/components/action-sheet/animations/md.enter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { Animation } from '../../../interface';
/**
* MD Action Sheet Enter Animation
*/
export function mdEnterAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.26);
Expand Down
8 changes: 4 additions & 4 deletions core/src/components/action-sheet/animations/md.leave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { Animation } from '../../../interface';
/**
* MD Action Sheet Leave Animation
*/
export function mdLeaveAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {

const baseAnimation = new Animation();
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper'));

backdropAnimation.fromTo('opacity', 0.26, 0);
Expand Down
4 changes: 2 additions & 2 deletions core/src/components/alert/alert-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface AlertOptions {
cssClass?: string | string[];
mode?: string;
inputs?: AlertInput[];
buttons?: (AlertButton|string)[];
buttons?: (AlertButton | string)[];
enableBackdropDismiss?: boolean;
translucent?: boolean;
}
Expand All @@ -20,7 +20,7 @@ export interface AlertInput {
checked?: boolean;
disabled?: boolean;
id?: string;
handler?: Function;
handler?: (input: AlertInput) => void;
min?: string | number;
max?: string | number;
}
Expand Down
16 changes: 8 additions & 8 deletions core/src/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,22 @@ export class Alert implements OverlayInterface {
/**
* Emitted after the alert has presented.
*/
@Event({eventName: 'ionAlertDidPresent'}) didPresent!: EventEmitter<void>;
@Event({ eventName: 'ionAlertDidPresent' }) didPresent!: EventEmitter<void>;

/**
* Emitted before the alert has presented.
*/
@Event({eventName: 'ionAlertWillPresent'}) willPresent!: EventEmitter<void>;
@Event({ eventName: 'ionAlertWillPresent' }) willPresent!: EventEmitter<void>;

/**
* Emitted before the alert has dismissed.
*/
@Event({eventName: 'ionAlertWillDismiss'}) willDismiss!: EventEmitter<OverlayEventDetail>;
@Event({ eventName: 'ionAlertWillDismiss' }) willDismiss!: EventEmitter<OverlayEventDetail>;

/**
* Emitted after the alert has dismissed.
*/
@Event({eventName: 'ionAlertDidDismiss'}) didDismiss!: EventEmitter<OverlayEventDetail>;
@Event({ eventName: 'ionAlertDidDismiss' }) didDismiss!: EventEmitter<OverlayEventDetail>;

@Watch('buttons')
buttonsChanged() {
Expand Down Expand Up @@ -244,16 +244,16 @@ export class Alert implements OverlayInterface {
const role = button.role;
const values = this.getValues();
if (isCancel(role)) {
this.dismiss({values}, role);
this.dismiss({ values }, role);
return;
}
const returnData = this.callButtonHandler(button, values);
if (returnData !== false) {
this.dismiss({values, ...returnData}, button.role);
this.dismiss({ values, ...returnData }, button.role);
}
}

private callButtonHandler(button: AlertButton|undefined, data: any = undefined) {
private callButtonHandler(button: AlertButton | undefined, data?: any) {
if (button && button.handler) {
// a handler has been provided, execute it
// pass the handler the values from the inputs
Expand Down Expand Up @@ -427,7 +427,7 @@ export class Alert implements OverlayInterface {
const subHdrId = `alert-${this.overlayId}-sub-hdr`;
const msgId = `alert-${this.overlayId}-msg`;

let labelledById: string|undefined = undefined;
let labelledById: string | undefined;
if (this.header) {
labelledById = hdrId;
} else if (this.subHeader) {
Expand Down
8 changes: 4 additions & 4 deletions core/src/components/alert/animations/ios.enter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* iOS Alert Enter Animation
*/
export function iosEnterAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function iosEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.3);
Expand Down
8 changes: 4 additions & 4 deletions core/src/components/alert/animations/ios.leave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* iOS Alert Leave Animation
*/
export function iosLeaveAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function iosLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper'));

backdropAnimation.fromTo('opacity', 0.3, 0);
Expand Down
8 changes: 4 additions & 4 deletions core/src/components/alert/animations/md.enter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* Md Alert Enter Animation
*/
export function mdEnterAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function mdEnterAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper'));

backdropAnimation.fromTo('opacity', 0.01, 0.5);
Expand Down
8 changes: 4 additions & 4 deletions core/src/components/alert/animations/md.leave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Animation } from '../../../interface';
/**
* Md Alert Leave Animation
*/
export function mdLeaveAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new Animation();
export function mdLeaveAnimation(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> {
const baseAnimation = new AnimationC();

const backdropAnimation = new Animation();
const backdropAnimation = new AnimationC();
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));

const wrapperAnimation = new Animation();
const wrapperAnimation = new AnimationC();
wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper'));

backdropAnimation.fromTo('opacity', 0.5, 0);
Expand Down
12 changes: 5 additions & 7 deletions core/src/components/animation-controller/animation-interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export interface AnimationController {

export interface Animation {
new (): any;
parent: Animation|undefined;
parent: Animation | undefined;
hasChildren: boolean;
addElement(el: Node|Node[]|NodeList): Animation;
addElement(el: Node | Node[] | NodeList): Animation;
add(childAnimation: Animation): Animation;
duration(milliseconds: number): Animation;
easing(name: string): Animation;
Expand All @@ -21,8 +21,8 @@ export interface Animation {
beforeRemoveClass(className: string): Animation;
beforeStyles(styles: { [property: string]: any; }): Animation;
beforeClearStyles(propertyNames: string[]): Animation;
beforeAddRead(domReadFn: Function): Animation;
beforeAddWrite(domWriteFn: Function): Animation;
beforeAddRead(domReadFn: () => void): Animation;
beforeAddWrite(domWriteFn: () => void): Animation;
duringAddClass(className: string): Animation;
afterAddClass(className: string): Animation;
afterRemoveClass(className: string): Animation;
Expand All @@ -43,9 +43,7 @@ export interface Animation {
}


export interface AnimationBuilder {
(Animation: Animation, baseEl: HTMLElement, opts?: any): Promise<Animation>;
}
export type AnimationBuilder = (Animation: Animation, baseEl: HTMLElement, opts?: any) => Promise<Animation>;

export interface PlayOptions {
duration?: number;
Expand Down
Loading

0 comments on commit 92e21a8

Please sign in to comment.