Skip to content
Snippets Groups Projects
Commit 2d72a074 authored by David Sehnal's avatar David Sehnal
Browse files

updated to typescript 3.0

parent 5dc0a5e5
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -33,7 +33,7 @@ export function download (data: Blob|string, downloadName = 'download') {
if (data instanceof Blob) {
// no downloading of blob urls in Safari
const reader = new FileReader()
reader.onloadend = () => open(reader.result)
reader.onloadend = () => open(reader.result as string)
reader.readAsDataURL(data)
} else {
open(data)
......
......@@ -12,7 +12,7 @@ export const readFileAs = (file: File, isBinary = false) => {
reject(new DOMException('Error parsing file.'))
}
fileReader.onload = () => {
resolve(isBinary ? new Uint8Array(fileReader.result) : fileReader.result)
resolve(isBinary ? new Uint8Array(fileReader.result as ArrayBuffer) : fileReader.result as string)
}
if (isBinary) {
fileReader.readAsArrayBuffer(file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment