chore(): tslint (#466)
* fix src tslint gulp ionic * - fix errors tslint
This commit is contained in:
parent
16628a49f7
commit
ed8c67ce7e
@ -27,7 +27,9 @@ gulp.task("minify:dist", function(){
|
|||||||
.pipe(gulp.dest('./dist'));
|
.pipe(gulp.dest('./dist'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('lint', tslint);
|
gulp.task('lint', function() {
|
||||||
|
tslint({src: 'src/**/*.ts'});
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task('plugin:create', function(){
|
gulp.task('plugin:create', function(){
|
||||||
if(flags.n && flags.n !== ''){
|
if(flags.n && flags.n !== ''){
|
||||||
|
@ -106,8 +106,9 @@ export class ThreeDeeTouch {
|
|||||||
*/
|
*/
|
||||||
static onHomeIconPressed(): Observable<any> {
|
static onHomeIconPressed(): Observable<any> {
|
||||||
return new Observable(observer => {
|
return new Observable(observer => {
|
||||||
if (window.ThreeDeeTouch && window.ThreeDeeTouch.onHomeIconPressed) window.ThreeDeeTouch.onHomeIconPressed = observer.next.bind(observer);
|
if (window.ThreeDeeTouch && window.ThreeDeeTouch.onHomeIconPressed) {
|
||||||
else {
|
window.ThreeDeeTouch.onHomeIconPressed = observer.next.bind(observer);
|
||||||
|
} else {
|
||||||
observer.error('3dTouch plugin is not available.');
|
observer.error('3dTouch plugin is not available.');
|
||||||
observer.complete();
|
observer.complete();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import { Cordova, Plugin } from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import { Observable } from 'rxjs/Observable';
|
|
||||||
|
|
||||||
|
|
||||||
declare var window;
|
declare var window;
|
||||||
|
|
||||||
|
@ -59,8 +59,23 @@ export class EmailComposer {
|
|||||||
*/
|
*/
|
||||||
static isAvailable(app?: string): Promise<any> {
|
static isAvailable(app?: string): Promise<any> {
|
||||||
return new Promise<boolean>((resolve, reject) => {
|
return new Promise<boolean>((resolve, reject) => {
|
||||||
if (app) cordova.plugins.email.isAvailable(app, (isAvailable) => { if (isAvailable) resolve(); else reject(); });
|
if (app) {
|
||||||
else cordova.plugins.email.isAvailable((isAvailable) => { if (isAvailable) resolve(); else reject(); });
|
cordova.plugins.email.isAvailable(app, (isAvailable) => {
|
||||||
|
if (isAvailable) {
|
||||||
|
resolve();
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
cordova.plugins.email.isAvailable((isAvailable) => {
|
||||||
|
if (isAvailable) {
|
||||||
|
resolve();
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -676,10 +676,6 @@ export class File {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let cflags: Flags = {
|
|
||||||
create: true
|
|
||||||
};
|
|
||||||
|
|
||||||
return File.resolveDirectoryUrl(path)
|
return File.resolveDirectoryUrl(path)
|
||||||
.then((fse) => {
|
.then((fse) => {
|
||||||
return File.getFile(fse, fileName, opts);
|
return File.getFile(fse, fileName, opts);
|
||||||
|
@ -204,8 +204,11 @@ export class GoogleMap {
|
|||||||
return new Promise<GoogleMapsMarker>(
|
return new Promise<GoogleMapsMarker>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
this._objectInstance.addMarker(options, (marker: any) => {
|
this._objectInstance.addMarker(options, (marker: any) => {
|
||||||
if (marker) resolve(new GoogleMapsMarker(marker));
|
if (marker) {
|
||||||
else reject();
|
resolve(new GoogleMapsMarker(marker));
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -215,8 +218,11 @@ export class GoogleMap {
|
|||||||
return new Promise<GoogleMapsCircle>(
|
return new Promise<GoogleMapsCircle>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
this._objectInstance.addCircle(options, (circle: any) => {
|
this._objectInstance.addCircle(options, (circle: any) => {
|
||||||
if (circle) resolve(new GoogleMapsCircle(circle));
|
if (circle) {
|
||||||
else reject();
|
resolve(new GoogleMapsCircle(circle));
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -226,8 +232,11 @@ export class GoogleMap {
|
|||||||
return new Promise<GoogleMapsPolygon>(
|
return new Promise<GoogleMapsPolygon>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
this._objectInstance.addPolygon(options, (polygon: any) => {
|
this._objectInstance.addPolygon(options, (polygon: any) => {
|
||||||
if (polygon) resolve(new GoogleMapsPolygon(polygon));
|
if (polygon) {
|
||||||
else reject();
|
resolve(new GoogleMapsPolygon(polygon));
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -237,8 +246,11 @@ export class GoogleMap {
|
|||||||
return new Promise<GoogleMapsPolyline>(
|
return new Promise<GoogleMapsPolyline>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
this._objectInstance.addPolyline(options, (polyline: any) => {
|
this._objectInstance.addPolyline(options, (polyline: any) => {
|
||||||
if (polyline) resolve(new GoogleMapsPolyline(polyline));
|
if (polyline) {
|
||||||
else reject();
|
resolve(new GoogleMapsPolyline(polyline));
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -248,8 +260,11 @@ export class GoogleMap {
|
|||||||
return new Promise<GoogleMapsTileOverlay>(
|
return new Promise<GoogleMapsTileOverlay>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
this._objectInstance.addTileOverlay(options, (tileOverlay: any) => {
|
this._objectInstance.addTileOverlay(options, (tileOverlay: any) => {
|
||||||
if (tileOverlay) resolve(new GoogleMapsTileOverlay(tileOverlay));
|
if (tileOverlay) {
|
||||||
else reject();
|
resolve(new GoogleMapsTileOverlay(tileOverlay));
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -259,8 +274,11 @@ export class GoogleMap {
|
|||||||
return new Promise<GoogleMapsGroundOverlay>(
|
return new Promise<GoogleMapsGroundOverlay>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
this._objectInstance.addGroundOverlay(options, (groundOverlay: any) => {
|
this._objectInstance.addGroundOverlay(options, (groundOverlay: any) => {
|
||||||
if (groundOverlay) resolve(new GoogleMapsGroundOverlay(groundOverlay));
|
if (groundOverlay) {
|
||||||
else reject();
|
resolve(new GoogleMapsGroundOverlay(groundOverlay));
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -270,8 +288,11 @@ export class GoogleMap {
|
|||||||
return new Promise<GoogleMapsKmlOverlay>(
|
return new Promise<GoogleMapsKmlOverlay>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
this._objectInstance.addKmlOverlay(options, (kmlOverlay: any) => {
|
this._objectInstance.addKmlOverlay(options, (kmlOverlay: any) => {
|
||||||
if (kmlOverlay) resolve(new GoogleMapsKmlOverlay(kmlOverlay));
|
if (kmlOverlay) {
|
||||||
else reject();
|
resolve(new GoogleMapsKmlOverlay(kmlOverlay));
|
||||||
|
} else {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -1047,7 +1068,7 @@ export interface GeocoderResult {
|
|||||||
permises?: string;
|
permises?: string;
|
||||||
phone?: string;
|
phone?: string;
|
||||||
url?: string
|
url?: string
|
||||||
},
|
};
|
||||||
locale?: string;
|
locale?: string;
|
||||||
locality?: string;
|
locality?: string;
|
||||||
position?: { lat: number; lng: number };
|
position?: { lat: number; lng: number };
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Cordova, Plugin } from './plugin';
|
import { Plugin } from './plugin';
|
||||||
|
|
||||||
|
|
||||||
declare var navigator: any;
|
declare var navigator: any;
|
||||||
|
@ -92,7 +92,7 @@ export interface CreateThumbnailOptions {
|
|||||||
export interface GetVideoInfoOptions {
|
export interface GetVideoInfoOptions {
|
||||||
|
|
||||||
/** The path to the video on the device. */
|
/** The path to the video on the device. */
|
||||||
fileUri: string
|
fileUri: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user