-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.ts
81 lines (72 loc) · 1.24 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
export enum Mode {
WALKING = "walking",
BUS = "bus",
REPLACEMENT_BUS = "replacement-bus",
COACH = "coach",
TUBE = "tube",
NATIONAL_RAIL = "national-rail",
OVERGROUND = "overground",
ELIZABETH_LINE = "elizabeth-line",
DLR = "dlr",
TRAM = "tram",
}
export type ModeColour = {
icon: string;
color: string;
};
type Coordinate = {
lat: number;
lon: number;
};
export type CoordinateAlt = {
lat: number;
lng: number;
};
type Leg = {
mode: {
id: Mode;
};
arrivalPoint: Coordinate & {
commonName: string;
};
departurePoint: Coordinate & {
commonName: string;
};
departureTime: string;
duration: number;
instruction: {
summary: string;
steps: {
descriptionHeading: string;
description: string;
distance: number;
duration: number;
}[];
};
path: {
stopPoints: {
name: string;
}[];
};
};
export type Journey = {
id: string;
fare: {
totalCost: number;
};
duration: number;
legs: Leg[];
};
export type Path = Coordinate[];
export type CoordinatesAlt2 = {
latitude: number;
longitude: number;
};
export type Location = {
coordiantes: CoordinatesAlt2;
placeId: string;
};
export type Journey2 = {
from: Location;
to: Location;
};