refactor(lib): run prettier

This commit is contained in:
Daniel Sogl
2020-05-16 14:40:49 +02:00
parent f5133c691d
commit 511a02d50b
326 changed files with 3079 additions and 4092 deletions
@@ -73,17 +73,9 @@ export interface ThemeableBrowserOptions {
export class ThemeableBrowserObject {
private _objectInstance: any;
constructor(
url: string,
target: string,
styleOptions: ThemeableBrowserOptions
) {
constructor(url: string, target: string, styleOptions: ThemeableBrowserOptions) {
try {
this._objectInstance = cordova.ThemeableBrowser.open(
url,
target,
styleOptions
);
this._objectInstance = cordova.ThemeableBrowser.open(url, target, styleOptions);
} catch (e) {
if (typeof window !== 'undefined') {
window.open(url);
@@ -142,15 +134,8 @@ export class ThemeableBrowserObject {
@InstanceCheck({ observable: true })
on(event: string): Observable<any> {
return new Observable<any>(observer => {
this._objectInstance.addEventListener(
event,
observer.next.bind(observer)
);
return () =>
this._objectInstance.removeEventListener(
event,
observer.next.bind(observer)
);
this._objectInstance.addEventListener(event, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
});
}
}
@@ -254,8 +239,8 @@ export class ThemeableBrowserObject {
'iOS',
'Ubuntu',
'Windows',
'Windows Phone'
]
'Windows Phone',
],
})
@Injectable()
export class ThemeableBrowser extends IonicNativePlugin {
@@ -266,11 +251,7 @@ export class ThemeableBrowser extends IonicNativePlugin {
* @param styleOptions {ThemeableBrowserOptions} Themeable browser options
* @returns {ThemeableBrowserObject}
*/
create(
url: string,
target: string,
styleOptions: ThemeableBrowserOptions
): ThemeableBrowserObject {
create(url: string, target: string, styleOptions: ThemeableBrowserOptions): ThemeableBrowserObject {
return new ThemeableBrowserObject(url, target, styleOptions);
}
}