mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 10:36:14 +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> {
|
||||
return this.resolveLocalFilesystemUrl(directoryUrl).then(de => {
|
||||
if (de.isDirectory) {
|
||||
return <DirectoryEntry>de;
|
||||
return de as DirectoryEntry;
|
||||
} else {
|
||||
const err = new FileError(13);
|
||||
err.message = 'input is not a directory';
|
||||
@ -1449,6 +1449,7 @@ export class File extends IonicNativePlugin {
|
||||
return getPromise<T>((resolve, reject) => {
|
||||
reader.onloadend = () => {
|
||||
if (reader.result !== undefined || reader.result !== null) {
|
||||
/* tslint:disable:no-angle-bracket-type-assertion */
|
||||
resolve(<T>(<any>reader.result));
|
||||
} else if (reader.error !== undefined || reader.error !== null) {
|
||||
reject(reader.error);
|
||||
|
@ -134,7 +134,7 @@ export class InAppBrowserObject {
|
||||
try {
|
||||
if (options && typeof options !== 'string') {
|
||||
options = Object.keys(options)
|
||||
.map((key: string) => `${key}=${(<InAppBrowserOptions>options)[key]}`)
|
||||
.map((key: string) => `${key}=${(options as InAppBrowserOptions)[key]}`)
|
||||
.join(',');
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
"ter-no-proto": false,
|
||||
"callable-types": false,
|
||||
"adjacent-overload-signatures": false,
|
||||
"no-angle-bracket-type-assertion": false,
|
||||
"no-constant-condition": false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user