From: Tim Düsterhus Date: Wed, 11 May 2022 08:18:04 +0000 (+0200) Subject: Target es2019 in tsconfig.json X-Git-Tag: 6.0.0_Alpha_1~1329^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8678ead99f9cda3e32bd13d917afc421a37ed7f9;p=GitHub%2FWoltLab%2FWCF.git Target es2019 in tsconfig.json Resolves #4595 --- diff --git a/tsconfig.json b/tsconfig.json index 1972ef3e25..cccdd4eedd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,13 +5,13 @@ ], "compilerOptions": { "allowJs": true, - "target": "es2017", + "target": "es2019", "module": "amd", "rootDir": "ts/", "outDir": "wcfsetup/install/files/js/", "lib": [ "dom", - "es2017" + "es2019" ], "strictNullChecks": true, "moduleResolution": "node", diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/QuickInstallation.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/QuickInstallation.js index e29ab61147..34eb51a8e5 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/QuickInstallation.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/QuickInstallation.js @@ -23,7 +23,7 @@ define(["require", "exports", "tslib", "../../../Ajax", "../../../Core", "../../ try { maybeJson = JSON.parse(decodedValue); } - catch (_a) { + catch { // Skip invalid values. } if ((0, Core_1.isPlainObject)(maybeJson)) { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/I18n/Plural.js b/wcfsetup/install/files/js/WoltLabSuite/Core/I18n/Plural.js index f52ac4e716..80bebb5331 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/I18n/Plural.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/I18n/Plural.js @@ -559,7 +559,7 @@ define(["require", "exports", "tslib", "../StringUtil"], function (require, expo return undefined; }, }; - const Plural = Object.assign({ + const Plural = { /** * Returns the plural category for the given value. */ @@ -626,6 +626,8 @@ define(["require", "exports", "tslib", "../StringUtil"], function (require, expo */ getV(n) { return n.toString().replace(/^[^.]*\.?/, "").length; - } }, Languages); + }, + ...Languages, + }; return Plural; }); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Color/Picker.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Color/Picker.js index e2642d3c18..08abd62ce3 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Color/Picker.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Color/Picker.js @@ -156,7 +156,7 @@ define(["require", "exports", "tslib", "../../Core", "../Dialog", "../../Dom/Uti getColor() { const color = this.colorInput.value; const alpha = this.alphaInput.value; - return Object.assign(Object.assign({}, ColorUtil.hexToRgb(color)), { a: +alpha }); + return { ...ColorUtil.hexToRgb(color), a: +alpha }; } /** * Opens the color picker after clicking on the picker button.