From ac66f47ff7d7110fbb7960156e7fdea68a4f0296 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 18 Nov 2020 15:14:59 +0100 Subject: [PATCH] Make WoltLabSuite/Core/List a proper generic class --- wcfsetup/install/files/ts/WoltLabSuite/Core/List.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/List.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/List.ts index d09d715dbf..6863b5f8f8 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/List.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/List.ts @@ -11,13 +11,13 @@ import * as Core from "./Core"; /** @deprecated 5.4 Use a `Set` instead. */ -class List { - private _set = new Set(); +class List { + private _set = new Set(); /** * Appends an element to the list, silently rejects adding an already existing value. */ - add(value: any): void { + add(value: T): void { this._set.add(value); } @@ -31,21 +31,21 @@ class List { /** * Removes an element from the list, returns true if the element was in the list. */ - delete(value: any): boolean { + delete(value: T): boolean { return this._set.delete(value); } /** * Invokes the `callback` for each element in the list. */ - forEach(callback: (value: any) => void): void { + forEach(callback: (value: T) => void): void { this._set.forEach(callback); } /** * Returns true if the list contains the element. */ - has(value: any): boolean { + has(value: T): boolean { return this._set.has(value); } -- 2.20.1