Set TypeScript build target to ES2022
authorAlexander Ebert <ebert@woltlab.com>
Tue, 13 Sep 2022 12:54:47 +0000 (14:54 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 13 Sep 2022 12:54:47 +0000 (14:54 +0200)
files/js/WoltLabSuite/Core/Conversation/Ui/MarkAllAsRead.js
files/js/WoltLabSuite/Core/Conversation/Ui/MarkAsRead.js
files/js/WoltLabSuite/Core/Conversation/Ui/Participant/Add.js
files/js/WoltLabSuite/Core/Conversation/Ui/Subject/Editor.js
files/js/WoltLabSuite/Core/Conversation/Ui/User/Menu/Data/Conversation.js
tsconfig.json

index 2e3d657cf20b2495a77ecb9daba2de3104ae4a83..4cec71679af18f59eea634a308427b56c26faadf 100644 (file)
@@ -13,12 +13,11 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ajax", "WoltLabSuite/C
     exports.setup = void 0;
     UiNotification = tslib_1.__importStar(UiNotification);
     async function markAllAsRead() {
-        var _a;
         await (0, Ajax_1.dboAction)("markAllAsRead", "wcf\\data\\conversation\\ConversationAction").dispatch();
         document.querySelectorAll(".conversationList .new").forEach((el) => {
             el.classList.remove("new");
         });
-        (_a = document.querySelector("#unreadConversations .badgeUpdate")) === null || _a === void 0 ? void 0 : _a.remove();
+        document.querySelector("#unreadConversations .badgeUpdate")?.remove();
         UiNotification.show();
     }
     function setup() {
index b16b5f24ba4773b342c703b02bf2c2fedd6ff98a..95ccbd1533c0031228e5372352e0efeec082c97b 100644 (file)
@@ -13,11 +13,10 @@ define(["require", "exports", "WoltLabSuite/Core/Ajax"], function (require, expo
     exports.setup = void 0;
     const unreadConversations = new WeakSet();
     async function markAsRead(conversation) {
-        var _a;
         const conversationId = parseInt(conversation.dataset.conversationId, 10);
         await (0, Ajax_1.dboAction)("markAsRead", "wcf\\data\\conversation\\ConversationAction").objectIds([conversationId]).dispatch();
         conversation.classList.remove("new");
-        (_a = conversation.querySelector(".columnAvatar p")) === null || _a === void 0 ? void 0 : _a.removeAttribute("title");
+        conversation.querySelector(".columnAvatar p")?.removeAttribute("title");
     }
     function setup() {
         document.querySelectorAll(".conversationList .new .columnAvatar").forEach((el) => {
index 436edce273baaaf92b8c10e0349ea6f852c75358..390ba9f4df3d02b6d1bd782ca35d7819fd5d0c8c 100644 (file)
@@ -15,6 +15,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ajax", "WoltLabSuite/C
     UiItemListUser = tslib_1.__importStar(UiItemListUser);
     Language = tslib_1.__importStar(Language);
     class UiParticipantAdd {
+        conversationId;
         constructor(conversationId) {
             this.conversationId = conversationId;
             Ajax.api(this, {
index 0cc10bdebdba0af2777ff486468d8de2bc37a765..bd0e5f79be527084bcb378d03c04bac3ddef7d10 100644 (file)
@@ -8,6 +8,8 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ui/Dialog", "WoltLabSu
     Language = tslib_1.__importStar(Language);
     UiNotification = tslib_1.__importStar(UiNotification);
     class UiSubjectEditor {
+        objectId;
+        subject;
         constructor(objectId) {
             this.objectId = objectId;
         }
index 754ee7aa3fac3c461340b0f2e6eb0eb9cad4c5f2..e0e5f3c24ff34794dbb4a25839574325788bb20b 100644 (file)
@@ -13,10 +13,12 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ajax", "WoltLabSuite/C
     exports.setup = void 0;
     View_1 = tslib_1.__importDefault(View_1);
     class UserMenuDataConversation {
+        button;
+        counter = 0;
+        options;
+        stale = true;
+        view = undefined;
         constructor(button, options) {
-            this.counter = 0;
-            this.stale = true;
-            this.view = undefined;
             this.button = button;
             this.options = options;
             const badge = button.querySelector(".badge");
index 69fdae68e3ca07f25fb93e086671f49b4d89d1bd..9188a36f2f4ca18428efda714e6c1a3c461341ce 100644 (file)
@@ -4,13 +4,14 @@
     "ts/**/*"
   ],
   "compilerOptions": {
-    "target": "es2019",
+    "target": "ES2022",
     "module": "amd",
     "rootDir": "ts/",
     "outDir": "files/js/",
     "lib": [
-      "dom",
-      "es2019"
+      "DOM",
+      "DOM.Iterable",
+      "ES2022"
     ],
     "strictNullChecks": true,
     "moduleResolution": "node",