mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 20:48:35 +00:00
TypeScript update to 6.0.3 (#3806)
## Description: Updating TypeScript to 6.0.3. Updating TypeScript-eslint to 8.59.1 for TS6 support. Concurrently needed to get updated as well to remove deprecated warning. Most things deleted are now just defaults. ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [X] I have added relevant tests to the test directory - [X] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: Babyboucher
This commit is contained in:
@@ -220,6 +220,14 @@ declare global {
|
||||
"start-game": CustomEvent;
|
||||
"join-changed": CustomEvent;
|
||||
"open-matchmaking": CustomEvent<undefined>;
|
||||
userMeResponse: CustomEvent<UserMeResponse | false>;
|
||||
"leave-lobby": CustomEvent;
|
||||
"update-game-config": CustomEvent;
|
||||
}
|
||||
|
||||
// Fixes the globalThis.addEventListener errors
|
||||
interface WindowEventMap {
|
||||
"event:user-settings-changed:settings.darkMode": CustomEvent<string>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ export class MatchmakingModal extends BaseModal {
|
||||
this.gameCheckInterval = setInterval(() => this.checkGame(), 1000);
|
||||
}
|
||||
};
|
||||
this.socket.onerror = (event: ErrorEvent) => {
|
||||
this.socket.onerror = (event: Event) => {
|
||||
console.error("WebSocket error occurred:", event);
|
||||
};
|
||||
this.socket.onclose = () => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { customElement, query } from "lit/decorators.js";
|
||||
import { PlayerType } from "../../../core/game/Game";
|
||||
import { GameView, PlayerView } from "../../../core/game/GameView";
|
||||
|
||||
import quickChatData from "resources/QuickChat.json" with { type: "json" };
|
||||
import quickChatData from "resources/QuickChat.json";
|
||||
import { EventBus } from "../../../core/EventBus";
|
||||
import { CloseViewEvent } from "../../InputHandler";
|
||||
import { SendQuickChatEvent } from "../../Transport";
|
||||
|
||||
@@ -510,7 +510,7 @@ export class PerformanceOverlay extends LitElement implements Layer {
|
||||
if (!this.isUserSettingsListenerAttached) {
|
||||
globalThis.addEventListener(
|
||||
`${USER_SETTINGS_CHANGED_EVENT}:${PERFORMANCE_OVERLAY_KEY}`,
|
||||
this.onUserSettingsChanged,
|
||||
this.onUserSettingsChanged as EventListener,
|
||||
);
|
||||
this.isUserSettingsListenerAttached = true;
|
||||
}
|
||||
@@ -522,7 +522,7 @@ export class PerformanceOverlay extends LitElement implements Layer {
|
||||
if (this.isUserSettingsListenerAttached) {
|
||||
globalThis.removeEventListener(
|
||||
`${USER_SETTINGS_CHANGED_EVENT}:${PERFORMANCE_OVERLAY_KEY}`,
|
||||
this.onUserSettingsChanged,
|
||||
this.onUserSettingsChanged as EventListener,
|
||||
);
|
||||
this.isUserSettingsListenerAttached = false;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ export class SpriteFactory {
|
||||
structureType: UnitType,
|
||||
isConstruction: boolean,
|
||||
isMarkedForDeletion: boolean,
|
||||
shape: string,
|
||||
shape: keyof typeof ICON_SIZE,
|
||||
renderIcon: boolean,
|
||||
): PIXI.Texture {
|
||||
const structureCanvas = document.createElement("canvas");
|
||||
|
||||
Reference in New Issue
Block a user