Skip to content

Commit 6984243

Browse files
committed
Fix types
1 parent 049b2e7 commit 6984243

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/web/storage/cache.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { dxGetAirline, dxGetAirport, dxGetFirs, dxGetTracons, dxInitDatabases }
1414

1515
type StatusSetter = (status: Partial<StatusMap> | ((prev: Partial<StatusMap>) => Partial<StatusMap>)) => void;
1616

17-
let airportsShort: AirportShort[] = [];
17+
let airportsShort: Required<AirportShort>[] = [];
1818
let controllersMerged: ControllerMerged[] = [];
1919
let initialized = false;
2020

@@ -65,7 +65,7 @@ export async function updateCache(delta: WsDelta): Promise<void> {
6565
...delta.airports.added,
6666
...delta.airports.updated.map((a) => {
6767
const existing = airportsShort.find((ap) => ap.icao === a.icao);
68-
return { ...existing, ...a };
68+
return { ...existing, ...(a as Required<AirportShort>) };
6969
}),
7070
];
7171

@@ -85,7 +85,7 @@ export async function updateCache(delta: WsDelta): Promise<void> {
8585
updateOverlays();
8686
}
8787

88-
export function getAirportShort(id: string): AirportShort | null {
88+
export function getAirportShort(id: string): Required<AirportShort> | null {
8989
return airportsShort.find((a) => a.icao === id) || null;
9090
}
9191

0 commit comments

Comments
 (0)