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:
babyboucher
2026-04-30 16:49:24 -05:00
committed by GitHub
parent 742a544a69
commit 4f20d2b332
15 changed files with 256 additions and 246 deletions
+2 -1
View File
@@ -40,6 +40,7 @@ import {
} from "./Game";
import { GameMap, TileRef } from "./GameMap";
import { GameUpdate, GameUpdateType } from "./GameUpdates";
import { UnitView } from "./GameView";
import { MotionPlanRecord, packMotionPlans } from "./MotionPlans";
import { PlayerImpl } from "./PlayerImpl";
import { RailNetwork } from "./RailNetwork";
@@ -1002,7 +1003,7 @@ export class GameImpl implements Game {
tile,
searchRange,
types,
predicate,
predicate as (unit: Unit | UnitView) => boolean,
playerId,
includeUnderConstruction,
);
+2 -1
View File
@@ -25,6 +25,7 @@ import {
Tick,
TrainType,
TransportShipState,
Unit,
UnitInfo,
UnitType,
WarshipState,
@@ -1151,7 +1152,7 @@ export class GameView implements GameMap {
tile,
searchRange,
types,
predicate,
predicate as (unit: Unit | UnitView) => boolean,
playerId,
includeUnderConstruction,
);
+2 -1
View File
@@ -113,7 +113,8 @@ export class RailNetworkImpl implements RailNetwork {
for (const cluster of this.dirtyClusters) {
const allOriginalStations = new Set(cluster.stations);
while (allOriginalStations.size > 0) {
const nextStation = allOriginalStations.values().next().value;
const nextStation = allOriginalStations.values().next()
.value as TrainStation;
const allConnectedStations = this.computeCluster(nextStation);
// Filter stations that are connected to the current cluster
for (const connectedStation of allConnectedStations) {
+1 -1
View File
@@ -106,5 +106,5 @@ export interface Stats {
trainSelfTrade(player: Player, gold: number | bigint): void;
// Another player's train arrives at own station
trainExternalTrade(player: Player, goldPlayer: number | bigint);
trainExternalTrade(player: Player, goldPlayer: number | bigint): void;
}
+9 -1
View File
@@ -9,6 +9,11 @@ type Span = {
const stack: Span[] = [];
declare global {
var __DEBUG_SPAN_ENABLED__: boolean | undefined;
var __DEBUG_SPANS__: Span[];
}
function isEnabled(): boolean {
return globalThis.__DEBUG_SPAN_ENABLED__ === true;
}
@@ -82,7 +87,10 @@ export const DebugSpan = {
);
};
const properties = {
const properties: {
timings: Record<string, number | undefined>;
data: Record<string, any>;
} = {
timings: { total: span.duration },
data: extractData(span),
};