mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-07 14:53:17 +08:00
refactor: follow no-angle-bracket-type-assertion lint rule
This commit is contained in:
parent
84db491ead
commit
26a8df9b7c
@ -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);
|
||||||
|
@ -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(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user