mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
refactor: follow no-angle-bracket-type-assertion lint rule
This commit is contained in:
@@ -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(',');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user