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.
...@@ -70,10 +70,10 @@ ...@@ -70,10 +70,10 @@
"@types/benchmark": "^1.0.31", "@types/benchmark": "^1.0.31",
"@types/compression": "0.0.36", "@types/compression": "0.0.36",
"@types/express": "^4.16.0", "@types/express": "^4.16.0",
"@types/jest": "^23.1.5", "@types/jest": "^23.3.1",
"@types/node": "~10.5.2", "@types/node": "^10.5.4",
"@types/node-fetch": "^2.1.1", "@types/node-fetch": "^2.1.2",
"@types/react": "^16.4.6", "@types/react": "^16.4.7",
"@types/react-dom": "^16.0.6", "@types/react-dom": "^16.0.6",
"benchmark": "^2.1.4", "benchmark": "^2.1.4",
"copyfiles": "^2.0.0", "copyfiles": "^2.0.0",
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
"file-loader": "^1.1.11", "file-loader": "^1.1.11",
"glslify-import": "^3.1.0", "glslify-import": "^3.1.0",
"glslify-loader": "^1.0.2", "glslify-loader": "^1.0.2",
"jest": "^23.4.0", "jest": "^23.4.2",
"jest-raw-loader": "^1.0.1", "jest-raw-loader": "^1.0.1",
"mini-css-extract-plugin": "^0.4.1", "mini-css-extract-plugin": "^0.4.1",
"node-sass": "^4.9.2", "node-sass": "^4.9.2",
...@@ -91,22 +91,22 @@ ...@@ -91,22 +91,22 @@
"resolve-url-loader": "^2.3.0", "resolve-url-loader": "^2.3.0",
"sass-loader": "^7.0.3", "sass-loader": "^7.0.3",
"style-loader": "^0.21.0", "style-loader": "^0.21.0",
"ts-jest": "^23.0.0", "ts-jest": "^23.0.1",
"tslint": "^5.10.0", "tslint": "^5.11.0",
"typescript": "^2.9.2", "typescript": "^3.0.0",
"uglify-js": "^3.4.4", "uglify-js": "^3.4.6",
"util.promisify": "^1.0.0", "util.promisify": "^1.0.0",
"webpack": "^4.16.0", "webpack": "^4.16.3",
"webpack-cli": "^3.0.8" "webpack-cli": "^3.1.0"
}, },
"dependencies": { "dependencies": {
"argparse": "^1.0.10", "argparse": "^1.0.10",
"compression": "^1.7.2", "compression": "^1.7.3",
"express": "^4.16.3", "express": "^4.16.3",
"immutable": "^4.0.0-rc.9", "immutable": "^4.0.0-rc.9",
"node-fetch": "^2.1.2", "node-fetch": "^2.2.0",
"react": "^16.4.1", "react": "^16.4.1",
"react-dom": "^16.4.1", "react-dom": "^16.4.1",
"rxjs": "^6.2.1" "rxjs": "^6.2.2"
} }
} }
...@@ -33,7 +33,7 @@ export function download (data: Blob|string, downloadName = 'download') { ...@@ -33,7 +33,7 @@ export function download (data: Blob|string, downloadName = 'download') {
if (data instanceof Blob) { if (data instanceof Blob) {
// no downloading of blob urls in Safari // no downloading of blob urls in Safari
const reader = new FileReader() const reader = new FileReader()
reader.onloadend = () => open(reader.result) reader.onloadend = () => open(reader.result as string)
reader.readAsDataURL(data) reader.readAsDataURL(data)
} else { } else {
open(data) open(data)
......
...@@ -12,7 +12,7 @@ export const readFileAs = (file: File, isBinary = false) => { ...@@ -12,7 +12,7 @@ export const readFileAs = (file: File, isBinary = false) => {
reject(new DOMException('Error parsing file.')) reject(new DOMException('Error parsing file.'))
} }
fileReader.onload = () => { fileReader.onload = () => {
resolve(isBinary ? new Uint8Array(fileReader.result) : fileReader.result) resolve(isBinary ? new Uint8Array(fileReader.result as ArrayBuffer) : fileReader.result as string)
} }
if (isBinary) { if (isBinary) {
fileReader.readAsArrayBuffer(file) fileReader.readAsArrayBuffer(file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment