refactor: follow no-angle-bracket-type-assertion lint rule

This commit is contained in:
Daniel 2018-09-17 16:14:23 +02:00
parent 84db491ead
commit 26a8df9b7c
3 changed files with 3 additions and 3 deletions

View File

@ -1361,7 +1361,7 @@ export class File extends IonicNativePlugin {
resolveDirectoryUrl(directoryUrl: string): Promise<DirectoryEntry> { resolveDirectoryUrl(directoryUrl: string): Promise<DirectoryEntry> {
return this.resolveLocalFilesystemUrl(directoryUrl).then(de => { return this.resolveLocalFilesystemUrl(directoryUrl).then(de => {
if (de.isDirectory) { if (de.isDirectory) {
return <DirectoryEntry>de; return de as DirectoryEntry;
} else { } else {
const err = new FileError(13); const err = new FileError(13);
err.message = 'input is not a directory'; err.message = 'input is not a directory';
@ -1449,6 +1449,7 @@ export class File extends IonicNativePlugin {
return getPromise<T>((resolve, reject) => { return getPromise<T>((resolve, reject) => {
reader.onloadend = () => { reader.onloadend = () => {
if (reader.result !== undefined || reader.result !== null) { if (reader.result !== undefined || reader.result !== null) {
/* tslint:disable:no-angle-bracket-type-assertion */
resolve(<T>(<any>reader.result)); resolve(<T>(<any>reader.result));
} else if (reader.error !== undefined || reader.error !== null) { } else if (reader.error !== undefined || reader.error !== null) {
reject(reader.error); reject(reader.error);

View File

@ -134,7 +134,7 @@ export class InAppBrowserObject {
try { try {
if (options && typeof options !== 'string') { if (options && typeof options !== 'string') {
options = Object.keys(options) options = Object.keys(options)
.map((key: string) => `${key}=${(<InAppBrowserOptions>options)[key]}`) .map((key: string) => `${key}=${(options as InAppBrowserOptions)[key]}`)
.join(','); .join(',');
} }

View File

@ -12,7 +12,6 @@
"ter-no-proto": false, "ter-no-proto": false,
"callable-types": false, "callable-types": false,
"adjacent-overload-signatures": false, "adjacent-overload-signatures": false,
"no-angle-bracket-type-assertion": false,
"no-constant-condition": false "no-constant-condition": false
} }
} }