Fixed a few more linter errors

This commit is contained in:
2019-11-17 18:44:30 +09:00
parent 878f1913e3
commit 7e25ee6faf
48 changed files with 69 additions and 59 deletions

View File

@ -12,4 +12,4 @@ export function bytesHumanReadable(fileSize: number): string {
}
return `${fileSize.toFixed(0)} ${unit}`
}
}

View File

@ -1,3 +1,3 @@
export function delay<T>(millis: number, value?: T): Promise<T> {
return new Promise(resolve => setTimeout(() => resolve(value), millis))
}
}

View File

@ -6,4 +6,4 @@ export * from "./plural"
export * from "./requestIdleCallback"
export * from "./swapElements"
export * from "./uploadWithProgress"
export * from "./bytesHumanReadable"
export * from "./bytesHumanReadable"

View File

@ -12,4 +12,4 @@ export function plural(count: number, singular: string): string {
}
return count + " " + singular + "s"
}
}

View File

@ -4,4 +4,4 @@ export function requestIdleCallback(func: Function) {
} else {
func()
}
}
}

View File

@ -6,4 +6,4 @@ export async function supportsWebP(): Promise<boolean> {
const data = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="
const blob = await fetch(data).then(r => r.blob())
return createImageBitmap(blob).then(() => true, () => false)
}
}

View File

@ -20,4 +20,4 @@ export function swapElements(a: Node, b: Node) {
bParent.appendChild(a)
}
}
}
}