Target es2019 in tsconfig.json
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 11 May 2022 08:18:04 +0000 (10:18 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 11 May 2022 08:19:12 +0000 (10:19 +0200)
Resolves #4595

tsconfig.json
wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Package/QuickInstallation.js
wcfsetup/install/files/js/WoltLabSuite/Core/I18n/Plural.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Color/Picker.js

index 1972ef3e251d900db3dbc1bc828126e57465ed05..cccdd4eeddf0313cdbcb9aa4f44ddc014d6b84a3 100644 (file)
@@ -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",
index e29ab611470451992e6f8df4eaf7139eeaff7c46..34eb51a8e5b3741436460d67caff79dc1d526094 100644 (file)
@@ -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)) {
index f52ac4e716d0a8629ba295f6ea317a04d65e0126..80bebb533169b715ae48162c81873eb95dc401bc 100644 (file)
@@ -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;
 });
index e2642d3c186c0c1603a881c6bbf6b20a6360e6a7..08abd62ce359f3c15776fced6173671fd62bfd14 100644 (file)
@@ -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.