mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-16 23:51:02 +00:00
frontend: Upgrade TypeScript from 2.9.2 to 4.4.2 (#387)
* Upgrade TS from 2.9.2 to 4.4.2 * Avoid mutating a readonly array `list` is a readonly array but `sort` will mutate the array in-place. In newer version of TS, it can catch this unexpected behavior. To avoid mutating a readonly array, we can sort with a new array with either `[...list]` or `list.slice()`. * Fix arguments of `window.location.reload` The `reload` function type definition in `lib.dom.d.ts` takes 0 arguments now. So, we cannot pass a boolean to it. Also, based on the documentation on MDN, Firefox is the only browser who supports passing a `forceForget` boolean to `reload` function. So, I wonder it should be fine to remove the boolean argument and align the behavior to other browsers. Ref: https://developer.mozilla.org/en-US/docs/Web/API/Location/reload
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
"tslint": "^6.1.1",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-plugin-prettier": "^2.3.0",
|
||||
"typescript": "^2.9.2"
|
||||
"typescript": "^4.4.2"
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.{ts,tsx,json,css}": [
|
||||
|
||||
Reference in New Issue
Block a user