style(lint): fix lint errors

This commit is contained in:
Adam Bradley
2018-03-01 16:21:06 -06:00
parent e84ddb69dc
commit 9c93df48d8
36 changed files with 313 additions and 115 deletions

View File

@ -12,20 +12,20 @@ export class ActionSheetController {
}
}
export function getActionSheetProxy(opts: ActionSheetOptions){
export function getActionSheetProxy(opts: ActionSheetOptions) {
return {
id: actionSheetId++,
state: PRESENTING,
opts: opts,
present: function() { return present(this)},
dismiss: function() { return dismiss(this)},
present: function() { return present(this); },
dismiss: function() { return dismiss(this); },
onDidDismiss: function(callback: (data: any, role: string) => void) {
(this as ActionSheetProxyInternal).onDidDismissHandler = callback;
},
onWillDismiss: function(callback: (data: any, role: string) => void) {
(this as ActionSheetProxyInternal).onWillDismissHandler = callback;
},
}
};
}
export function present(actionSheetProxy: ActionSheetProxyInternal): Promise<any> {
@ -82,8 +82,8 @@ export function loadOverlay(opts: ActionSheetOptions): Promise<HTMLIonActionShee
}
export interface ActionSheetProxy {
present(): Promise<void>
dismiss(): Promise<void>
present(): Promise<void>;
dismiss(): Promise<void>;
onDidDismiss(callback: (data: any, role: string) => void): void;
onWillDismiss(callback: (data: any, role: string) => void): void;
}
@ -101,4 +101,4 @@ export const PRESENTING = 1;
export const DISMISSING = 2;
const ION_ACTION_SHEET_DID_DISMISS_EVENT = 'ionActionSheetDidDismiss';
const ION_ACTION_SHEET_WILL_DISMISS_EVENT = 'ionActionSheetWillDismiss';
const ION_ACTION_SHEET_WILL_DISMISS_EVENT = 'ionActionSheetWillDismiss';

View File

@ -12,20 +12,20 @@ export class AlertController {
}
}
export function getAlertProxy(opts: AlertOptions){
export function getAlertProxy(opts: AlertOptions) {
return {
id: alertId++,
state: PRESENTING,
opts: opts,
present: function() { return present(this)},
dismiss: function() { return dismiss(this)},
present: function() { return present(this); },
dismiss: function() { return dismiss(this); },
onDidDismiss: function(callback: (data: any, role: string) => void) {
(this as AlertProxyInternal).onDidDismissHandler = callback;
},
onWillDismiss: function(callback: (data: any, role: string) => void) {
(this as AlertProxyInternal).onWillDismissHandler = callback;
},
}
};
}
export function present(alertProxy: AlertProxyInternal): Promise<any> {
@ -82,8 +82,8 @@ export function loadOverlay(opts: AlertOptions): Promise<HTMLIonAlertElement> {
}
export interface AlertProxy {
present(): Promise<void>
dismiss(): Promise<void>
present(): Promise<void>;
dismiss(): Promise<void>;
onDidDismiss(callback: (data: any, role: string) => void): void;
onWillDismiss(callback: (data: any, role: string) => void): void;
}
@ -101,4 +101,4 @@ export const PRESENTING = 1;
export const DISMISSING = 2;
const ION_ALERT_DID_DISMISS_EVENT = 'ionAlertDidDismiss';
const ION_ALERT_WILL_DISMISS_EVENT = 'ionAlertWillDismiss';
const ION_ALERT_WILL_DISMISS_EVENT = 'ionAlertWillDismiss';

View File

@ -90,4 +90,4 @@ export function getNavByIdOrNameAsyncImpl(app: App, nameOrId: number | string):
return app._element.componentOnReady().then(() => {
return app._element.getNavByIdOrName(nameOrId);
});
}
}

View File

@ -30,4 +30,4 @@ function getElement(): Promise<HTMLIonEventsElement> {
});
}
const ELEMENT_NAME = 'ion-events';
const ELEMENT_NAME = 'ion-events';

View File

@ -12,20 +12,20 @@ export class LoadingController {
}
}
export function getLoadingProxy(opts: LoadingOptions){
export function getLoadingProxy(opts: LoadingOptions) {
return {
id: loadingId++,
state: PRESENTING,
opts: opts,
present: function() { return present(this)},
dismiss: function() { return dismiss(this)},
present: function() { return present(this); },
dismiss: function() { return dismiss(this); },
onDidDismiss: function(callback: (data: any, role: string) => void) {
(this as LoadingProxyInternal).onDidDismissHandler = callback;
},
onWillDismiss: function(callback: (data: any, role: string) => void) {
(this as LoadingProxyInternal).onWillDismissHandler = callback;
},
}
};
}
export function present(loadingProxy: LoadingProxyInternal): Promise<any> {
@ -82,8 +82,8 @@ export function loadOverlay(opts: LoadingOptions): Promise<HTMLIonLoadingElement
}
export interface LoadingProxy {
present(): Promise<void>
dismiss(): Promise<void>
present(): Promise<void>;
dismiss(): Promise<void>;
onDidDismiss(callback: (data: any, role: string) => void): void;
onWillDismiss(callback: (data: any, role: string) => void): void;
}
@ -101,4 +101,4 @@ export const PRESENTING = 1;
export const DISMISSING = 2;
const ION_LOADING_DID_DISMISS_EVENT = 'ionLoadingDidDismiss';
const ION_LOADING_WILL_DISMISS_EVENT = 'ionLoadingWillDismiss';
const ION_LOADING_WILL_DISMISS_EVENT = 'ionLoadingWillDismiss';

View File

@ -93,7 +93,7 @@ export class MenuController {
return false;
}
isOpenAsync(menuId?: string): Promise<boolean>{
isOpenAsync(menuId?: string): Promise<boolean> {
return element.componentOnReady().then(() => {
return element.isOpen(menuId);
});
@ -124,4 +124,4 @@ export class MenuController {
return element.toggle(menuId);
});
}
}
}

View File

@ -120,4 +120,4 @@ export class NavController implements PublicNav {
}
return [];
}
}
}

View File

@ -5,7 +5,7 @@ export type DocumentDirection = 'ltr' | 'rtl';
let dir: DocumentDirection = 'ltr';
let isRtl = false;
let lang: string = '';
let lang = '';
export class Platform {
@ -225,4 +225,4 @@ export function getHydratedPlatform(platform: Platform): Promise<HTMLIonPlatform
});
}
return platform._element.componentOnReady();
}
}

View File

@ -12,20 +12,20 @@ export class ToastController {
}
}
export function getToastProxy(opts: ToastOptions){
export function getToastProxy(opts: ToastOptions) {
return {
id: toastId++,
state: PRESENTING,
opts: opts,
present: function() { return present(this)},
dismiss: function() { return dismiss(this)},
present: function() { return present(this); },
dismiss: function() { return dismiss(this); },
onDidDismiss: function(callback: (data: any, role: string) => void) {
(this as ToastProxyInternal).onDidDismissHandler = callback;
},
onWillDismiss: function(callback: (data: any, role: string) => void) {
(this as ToastProxyInternal).onWillDismissHandler = callback;
},
}
};
}
export function present(toastProxy: ToastProxyInternal): Promise<any> {
@ -82,8 +82,8 @@ export function loadOverlay(opts: ToastOptions): Promise<HTMLIonToastElement> {
}
export interface ToastProxy {
present(): Promise<void>
dismiss(): Promise<void>
present(): Promise<void>;
dismiss(): Promise<void>;
onDidDismiss(callback: (data: any, role: string) => void): void;
onWillDismiss(callback: (data: any, role: string) => void): void;
}
@ -101,4 +101,4 @@ export const PRESENTING = 1;
export const DISMISSING = 2;
const ION_TOAST_DID_DISMISS_EVENT = 'ionToastDidDismiss';
const ION_TOAST_WILL_DISMISS_EVENT = 'ionToastWillDismiss';
const ION_TOAST_WILL_DISMISS_EVENT = 'ionToastWillDismiss';