From f219da49a17f8d0ac7e76858f6abe1176b8ae895 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 31 Oct 2020 16:23:13 +0100 Subject: [PATCH] Unified the return types for `_ajaxSetup()` and `_dialogSetup()` --- wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Data.ts | 4 ++-- .../install/files/ts/WoltLabSuite/Core/BackgroundQueue.ts | 4 ++-- .../ts/WoltLabSuite/Core/Ui/Article/MarkAllAsRead.ts | 4 ++-- .../files/ts/WoltLabSuite/Core/Ui/Article/Search.ts | 8 ++++---- .../install/files/ts/WoltLabSuite/Core/Ui/Confirmation.ts | 4 ++-- wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Dialog.ts | 4 ++-- .../install/files/ts/WoltLabSuite/Core/Ui/Dialog/Data.ts | 4 ++-- .../install/files/ts/WoltLabSuite/Core/Ui/File/Delete.ts | 4 ++-- .../install/files/ts/WoltLabSuite/Core/Ui/Page/JumpTo.ts | 4 ++-- .../install/files/ts/WoltLabSuite/Core/Ui/Page/Search.ts | 8 ++++---- .../files/ts/WoltLabSuite/Core/Ui/Page/Search/Handler.ts | 4 ++-- .../install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts | 4 ++-- .../install/files/ts/WoltLabSuite/Core/Ui/Suggestion.ts | 4 ++-- .../files/ts/WoltLabSuite/Core/Ui/User/Activity/Recent.ts | 4 ++-- .../ts/WoltLabSuite/Core/Ui/User/CoverPhoto/Delete.ts | 4 ++-- .../install/files/ts/WoltLabSuite/Core/Ui/User/Editor.ts | 8 ++++---- .../install/files/ts/WoltLabSuite/Core/Ui/User/List.ts | 8 ++++---- .../Core/Ui/User/Profile/Menu/Item/Abstract.ts | 4 ++-- .../WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow.ts | 4 ++-- .../WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore.ts | 4 ++-- .../files/ts/WoltLabSuite/Core/Ui/User/Trophy/List.ts | 8 ++++---- 21 files changed, 52 insertions(+), 52 deletions(-) diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Data.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Data.ts index 4deefb2ed9..3aa9065515 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Data.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ajax/Data.ts @@ -43,7 +43,7 @@ export type CallbackSuccess = ( requestData: RequestData ) => void; export type CallbackUploadProgress = (event: ProgressEvent) => void; -export type CallbackSetup = () => RequestOptions; +export type AjaxCallbackSetup = () => RequestOptions; export interface AjaxCallbackObject { _ajaxFailure?: CallbackFailure; @@ -51,7 +51,7 @@ export interface AjaxCallbackObject { _ajaxProgress?: CallbackProgress; _ajaxSuccess: CallbackSuccess; _ajaxUploadProgress?: CallbackUploadProgress; - _ajaxSetup: CallbackSetup; + _ajaxSetup: AjaxCallbackSetup; } export interface RequestOptions { diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/BackgroundQueue.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/BackgroundQueue.ts index 7bf70a73a7..1199abb9e9 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/BackgroundQueue.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/BackgroundQueue.ts @@ -8,7 +8,7 @@ */ import * as Ajax from "./Ajax"; -import { AjaxCallbackObject, CallbackSetup, ResponseData } from "./Ajax/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup, ResponseData } from "./Ajax/Data"; class BackgroundQueue implements AjaxCallbackObject { private _invocations = 0; @@ -42,7 +42,7 @@ class BackgroundQueue implements AjaxCallbackObject { } } - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return { url: this._url, ignoreError: true, diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Article/MarkAllAsRead.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Article/MarkAllAsRead.ts index ff81434f19..4a7c8add70 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Article/MarkAllAsRead.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Article/MarkAllAsRead.ts @@ -8,7 +8,7 @@ */ import * as Ajax from "../../Ajax"; -import { AjaxCallbackObject, CallbackSetup } from "../../Ajax/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup } from "../../Ajax/Data"; class UiArticleMarkAllAsRead implements AjaxCallbackObject { constructor() { @@ -33,7 +33,7 @@ class UiArticleMarkAllAsRead implements AjaxCallbackObject { document.querySelectorAll(".articleList .newMessageBadge").forEach((el) => el.remove()); } - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return { data: { actionName: "markAllAsRead", diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Article/Search.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Article/Search.ts index 49096a4e48..6fca7bb094 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Article/Search.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Article/Search.ts @@ -1,6 +1,6 @@ import * as Ajax from "../../Ajax"; -import { AjaxCallbackObject, CallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data"; -import { DialogCallbackObject, CallbackSetup as DialogSetup } from "../Dialog/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data"; +import { DialogCallbackObject, DialogCallbackSetup } from "../Dialog/Data"; import DomUtil from "../../Dom/Util"; import * as Language from "../../Language"; import * as StringUtil from "../../StringUtil"; @@ -89,7 +89,7 @@ class UiArticleSearch implements AjaxCallbackObject, DialogCallbackObject { } } - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return { data: { actionName: "search", @@ -98,7 +98,7 @@ class UiArticleSearch implements AjaxCallbackObject, DialogCallbackObject { }; } - _dialogSetup(): ReturnType { + _dialogSetup(): ReturnType { return { id: "wcfUiArticleSearch", options: { diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Confirmation.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Confirmation.ts index 6bb30e04a4..e19a0eb49e 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Confirmation.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Confirmation.ts @@ -11,7 +11,7 @@ import * as Core from "../Core"; import * as Language from "../Language"; import UiDialog from "./Dialog"; -import { DialogCallbackObject, CallbackSetup as DialogSetup } from "./Dialog/Data"; +import { DialogCallbackObject, DialogCallbackSetup } from "./Dialog/Data"; class UiConfirmation implements DialogCallbackObject { private _active = false; @@ -126,7 +126,7 @@ class UiConfirmation implements DialogCallbackObject { this.confirmButton.focus(); } - _dialogSetup(): ReturnType { + _dialogSetup(): ReturnType { return { id: "wcfSystemConfirmation", options: { diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Dialog.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Dialog.ts index 8e48980a97..576c8974d2 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Dialog.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Dialog.ts @@ -24,7 +24,7 @@ import * as Language from "../Language"; import * as Environment from "../Environment"; import * as EventHandler from "../Event/Handler"; import UiDropdownSimple from "./Dropdown/Simple"; -import { CallbackSetup } from "../Ajax/Data"; +import { AjaxCallbackSetup } from "../Ajax/Data"; let _activeDialog: string | null = null; let _callbackFocus: (event: FocusEvent) => void; @@ -889,7 +889,7 @@ const UiDialog = { return id.toString(); }, - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return {}; }, }; diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Dialog/Data.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Dialog/Data.ts index 38be27a057..02eb403279 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Dialog/Data.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Dialog/Data.ts @@ -2,11 +2,11 @@ import { RequestPayload, ResponseData } from "../../Ajax/Data"; export type DialogHtml = DocumentFragment | string | null; -export type CallbackSetup = () => DialogSettings; +export type DialogCallbackSetup = () => DialogSettings; export type CallbackSubmit = () => void; export interface DialogCallbackObject { - _dialogSetup: CallbackSetup; + _dialogSetup: DialogCallbackSetup; _dialogSubmit?: CallbackSubmit; } diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/File/Delete.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/File/Delete.ts index 19a48e918c..f24d8def20 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/File/Delete.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/File/Delete.ts @@ -9,7 +9,7 @@ */ import * as Ajax from "../../Ajax"; -import { AjaxCallbackObject, CallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data"; import * as Core from "../../Core"; import DomChangeListener from "../../Dom/Change/Listener"; import * as Language from "../../Language"; @@ -163,7 +163,7 @@ class UiFileDelete implements AjaxCallbackObject { Core.triggerEvent(this.target, "change"); } - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return { url: "index.php?ajax-file-delete/&t=" + window.SECURITY_TOKEN, }; diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/JumpTo.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/JumpTo.ts index bb6d31a820..44f4dda579 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/JumpTo.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/JumpTo.ts @@ -7,7 +7,7 @@ * @module WoltLabSuite/Core/Ui/Page/JumpTo */ -import { DialogCallbackObject, CallbackSetup as DialogSetup } from "../Dialog/Data"; +import { DialogCallbackObject, DialogCallbackSetup } from "../Dialog/Data"; import * as Language from "../../Language"; import UiDialog from "../Dialog"; @@ -88,7 +88,7 @@ class UiPageJumpTo implements DialogCallbackObject { UiDialog.close(this); } - _dialogSetup(): ReturnType { + _dialogSetup(): ReturnType { const source = `
diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Search.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Search.ts index 611294a2fe..cfc95d69f3 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Search.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Search.ts @@ -1,6 +1,6 @@ import * as Ajax from "../../Ajax"; -import { AjaxCallbackObject, CallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data"; -import { DialogCallbackObject, CallbackSetup as DialogSetup } from "../Dialog/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data"; +import { DialogCallbackObject, DialogCallbackSetup } from "../Dialog/Data"; import DomUtil from "../../Dom/Util"; import * as Language from "../../Language"; import * as StringUtil from "../../StringUtil"; @@ -89,7 +89,7 @@ class UiPageSearch implements AjaxCallbackObject, DialogCallbackObject { } } - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return { data: { actionName: "search", @@ -98,7 +98,7 @@ class UiPageSearch implements AjaxCallbackObject, DialogCallbackObject { }; } - _dialogSetup(): ReturnType { + _dialogSetup(): ReturnType { return { id: "wcfUiPageSearch", options: { diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Search/Handler.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Search/Handler.ts index 3e33ca0025..81d48de43a 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Search/Handler.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/Search/Handler.ts @@ -12,7 +12,7 @@ import * as Language from "../../../Language"; import * as StringUtil from "../../../StringUtil"; import DomUtil from "../../../Dom/Util"; import UiDialog from "../../Dialog"; -import { DialogCallbackObject, CallbackSetup as DialogSetup } from "../../Dialog/Data"; +import { DialogCallbackObject, DialogCallbackSetup } from "../../Dialog/Data"; import UiPageSearchInput from "./Input"; import { DatabaseObjectActionResponse } from "../../../Ajax/Data"; @@ -137,7 +137,7 @@ class UiPageSearchHandler implements DialogCallbackObject { UiDialog.close(this); } - _dialogSetup(): ReturnType { + _dialogSetup(): ReturnType { return { id: "wcfUiPageSearchHandler", options: { diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts index 1ab9c20fce..c9ab493a9f 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts @@ -11,7 +11,7 @@ import * as Ajax from "../../Ajax"; import * as Core from "../../Core"; import DomUtil from "../../Dom/Util"; import UiDropdownSimple from "../Dropdown/Simple"; -import { CallbackSetup, DatabaseObjectActionPayload, DatabaseObjectActionResponse } from "../../Ajax/Data"; +import { AjaxCallbackSetup, DatabaseObjectActionPayload, DatabaseObjectActionResponse } from "../../Ajax/Data"; import AjaxRequest from "../../Ajax/Request"; import { CallbackDropdownInit, CallbackSelect, SearchInputOptions } from "./Data"; @@ -359,7 +359,7 @@ class UiSearchInput { return listItem; } - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return { data: this.ajaxPayload, }; diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Suggestion.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Suggestion.ts index 48b4d810e8..ea120b3ada 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Suggestion.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Suggestion.ts @@ -11,7 +11,7 @@ import * as Ajax from "../Ajax"; import * as Core from "../Core"; import { AjaxCallbackObject, - CallbackSetup, + AjaxCallbackSetup, DatabaseObjectActionPayload, DatabaseObjectActionResponse, } from "../Ajax/Data"; @@ -198,7 +198,7 @@ class UiSuggestion implements AjaxCallbackObject { }); } - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return { data: this.ajaxPayload, }; diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Activity/Recent.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Activity/Recent.ts index 690691d3da..01ac03263f 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Activity/Recent.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Activity/Recent.ts @@ -1,5 +1,5 @@ import * as Ajax from "../../../Ajax"; -import { AjaxCallbackObject, RequestOptions } from "../../../Ajax/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup } from "../../../Ajax/Data"; import * as Core from "../../../Core"; import * as Language from "../../../Language"; import DomUtil from "../../../Dom/Util"; @@ -92,7 +92,7 @@ class UiUserActivityRecent implements AjaxCallbackObject { } } - _ajaxSetup(): RequestOptions { + _ajaxSetup(): ReturnType { return { data: { className: "wcf\\data\\user\\activity\\event\\UserActivityEventAction", diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/CoverPhoto/Delete.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/CoverPhoto/Delete.ts index b4ca4733a0..d3bd4b5260 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/CoverPhoto/Delete.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/CoverPhoto/Delete.ts @@ -8,7 +8,7 @@ */ import * as Ajax from "../../../Ajax"; -import { AjaxCallbackObject, ResponseData } from "../../../Ajax/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup, ResponseData } from "../../../Ajax/Data"; import DomUtil from "../../../Dom/Util"; import * as EventHandler from "../../../Event/Handler"; import * as Language from "../../../Language"; @@ -61,7 +61,7 @@ class UiUserCoverPhotoDelete implements AjaxCallbackObject { UiNotification.show(); } - _ajaxSetup() { + _ajaxSetup(): ReturnType { return { data: { actionName: "deleteCoverPhoto", diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Editor.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Editor.ts index ac354aae7c..a42ee29275 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Editor.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Editor.ts @@ -8,9 +8,9 @@ */ import * as Ajax from "../../Ajax"; -import { AjaxCallbackObject, CallbackSetup } from "../../Ajax/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup } from "../../Ajax/Data"; import * as Core from "../../Core"; -import { DialogCallbackObject, CallbackSetup as DialogSetup } from "../Dialog/Data"; +import { DialogCallbackObject, DialogCallbackSetup } from "../Dialog/Data"; import DomUtil from "../../Dom/Util"; import * as Language from "../../Language"; import * as StringUtil from "../../StringUtil"; @@ -183,7 +183,7 @@ class UserEditor implements AjaxCallbackObject, DialogCallbackObject { UiNotification.show(); } - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return { data: { className: "wcf\\data\\user\\UserAction", @@ -192,7 +192,7 @@ class UserEditor implements AjaxCallbackObject, DialogCallbackObject { }; } - _dialogSetup(): ReturnType { + _dialogSetup(): ReturnType { return { id: "wcfUiUserEditor", options: { diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/List.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/List.ts index a6c5b56416..359a62aac3 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/List.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/List.ts @@ -12,8 +12,8 @@ import * as Core from "../../Core"; import DomUtil from "../../Dom/Util"; import UiDialog from "../Dialog"; import UiPagination from "../Pagination"; -import { AjaxCallbackObject, CallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data"; -import { DialogCallbackObject, DialogData, CallbackSetup as DialogSetup } from "../Dialog/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data"; +import { DialogCallbackObject, DialogData, DialogCallbackSetup } from "../Dialog/Data"; /** * @constructor @@ -98,7 +98,7 @@ class UiUserList implements AjaxCallbackObject, DialogCallbackObject { this.showPage(); } - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return { data: { actionName: "getGroupedUserList", @@ -108,7 +108,7 @@ class UiUserList implements AjaxCallbackObject, DialogCallbackObject { }; } - _dialogSetup(): ReturnType { + _dialogSetup(): ReturnType { return { id: DomUtil.getUniqueId(), options: { diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.ts index 4a3b5bd846..a2d7213f1f 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.ts @@ -8,7 +8,7 @@ */ import * as Ajax from "../../../../../Ajax"; -import { AjaxCallbackObject, RequestOptions, ResponseData } from "../../../../../Ajax/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup, ResponseData } from "../../../../../Ajax/Data"; abstract class UiUserProfileMenuItemAbstract implements AjaxCallbackObject { protected readonly _button = document.createElement("a"); @@ -99,7 +99,7 @@ abstract class UiUserProfileMenuItemAbstract implements AjaxCallbackObject { /** * Returns the default Ajax request data */ - _ajaxSetup(): RequestOptions { + _ajaxSetup(): ReturnType { // This should be an abstract method, but cannot be marked as such for backwards compatibility. throw new Error("Implement me!"); diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow.ts index d836cba227..633deaf9ab 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow.ts @@ -1,5 +1,5 @@ import * as Language from "../../../../../Language"; -import { RequestOptions, ResponseData } from "../../../../../Ajax/Data"; +import { AjaxCallbackSetup, ResponseData } from "../../../../../Ajax/Data"; import * as UiNotification from "../../../../Notification"; import UiUserProfileMenuItemAbstract from "./Abstract"; @@ -29,7 +29,7 @@ class UiUserProfileMenuItemFollow extends UiUserProfileMenuItemAbstract { UiNotification.show(); } - _ajaxSetup(): RequestOptions { + _ajaxSetup(): ReturnType { return { data: { className: "wcf\\data\\user\\follow\\UserFollowAction", diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore.ts index b376d01f16..c36e91ff42 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore.ts @@ -1,5 +1,5 @@ import * as Language from "../../../../../Language"; -import { RequestOptions, ResponseData } from "../../../../../Ajax/Data"; +import { AjaxCallbackSetup, ResponseData } from "../../../../../Ajax/Data"; import * as UiNotification from "../../../../Notification"; import UiUserProfileMenuItemAbstract from "./Abstract"; @@ -29,7 +29,7 @@ class UiUserProfileMenuItemIgnore extends UiUserProfileMenuItemAbstract { UiNotification.show(); } - _ajaxSetup(): RequestOptions { + _ajaxSetup(): ReturnType { return { data: { className: "wcf\\data\\user\\ignore\\UserIgnoreAction", diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Trophy/List.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Trophy/List.ts index 51aba6ee18..9f407eaef1 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Trophy/List.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Trophy/List.ts @@ -8,8 +8,8 @@ */ import * as Ajax from "../../../Ajax"; -import { AjaxCallbackObject, CallbackSetup, DatabaseObjectActionResponse } from "../../../Ajax/Data"; -import { DialogCallbackObject, DialogData, CallbackSetup as DialogSetup } from "../../Dialog/Data"; +import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../../Ajax/Data"; +import { DialogCallbackObject, DialogData, DialogCallbackSetup } from "../../Dialog/Data"; import DomChangeListener from "../../../Dom/Change/Listener"; import UiDialog from "../../Dialog"; import UiPagination from "../../Pagination"; @@ -124,7 +124,7 @@ class UiUserTrophyList implements AjaxCallbackObject, DialogCallbackObject { this.showPage(); } - _ajaxSetup(): ReturnType { + _ajaxSetup(): ReturnType { return { data: { actionName: "getGroupedUserTrophyList", @@ -133,7 +133,7 @@ class UiUserTrophyList implements AjaxCallbackObject, DialogCallbackObject { }; } - _dialogSetup(): ReturnType { + _dialogSetup(): ReturnType { return { id: "userTrophyListOverlay", options: { -- 2.20.1