fixed type errors

This commit is contained in:
2025-09-16 14:20:38 +01:00
parent c506c395e6
commit b98e3ed85d
21 changed files with 161 additions and 130 deletions

View File

@@ -9,8 +9,8 @@ export type SightingType = {
countryCode: string;
timeStamp: string;
detailsUrl: string;
overviewPlateRect: number[];
plateTrack: Array<number[]>;
overviewPlateRect?: [number, number, number, number];
plateTrack?: [number, number, number, number][];
make: string;
model: string;
color: string;
@@ -71,39 +71,6 @@ export type HotlistUploadType = {
file: string | null;
};
export type SightingWidgetType = {
debug: string;
SaFID: string;
ref: number; // unique, increasing
idx?: number; // client-side slot index
vrm: string;
vrmSecondary: string; // empty string means missing
countryCode: string;
timeStamp: string; // formatted string
timeStampMillis: number; // epoch millis
motion: string; // e.g., "AWAY" or "TOWARDS"
seenCount: string;
charHeight: string;
overviewUrl: string;
detailsUrl: string;
make: string;
model: string;
color: string;
category: string;
plateSize: string | number;
overviewSize: string | number;
locationName: string;
laneID: string | number;
radarSpeed: string | number;
trackSpeed: string | number;
srcCam: 0 | 1;
plateUrlInfrared: string;
plateUrlColour: string;
overviewPlateRect: [number, number, number, number]; // [x,y,w,h] normalized 0..1
plateTrack: [number, number, number, number][];
metadata: Metadata;
};
export type VersionFieldType = {
version: string;
revision: string;
@@ -183,10 +150,15 @@ export type AlertState = {
allAlerts: SightingType[];
};
export type AlertPayload = {
payload: SightingType | string;
type: string;
};
export type AlertPayload =
| {
payload: SightingType;
type: "ADD";
}
| {
payload: string;
type: "SEARCH";
};
export type ActionType = {
payload: SightingType | string;