Update config files to TS

This commit is contained in:
Fred Boniface
2023-07-24 11:05:08 +01:00
parent 8dc0b102a0
commit 69949fb8f4
8 changed files with 125 additions and 108 deletions

View File

@@ -1,53 +1,44 @@
const tocMap = {
gw: 'Great Western Railway',
sw: 'South Western Railway',
id: 'Island Line',
nt: 'Northern',
aw: 'Transport for Wales',
cc: 'c2c',
cs: 'Caledonian Sleeper',
ch: 'Chiltern Railways',
xc: 'CrossCountry',
em: 'East Midlands Railway',
es: 'Eurostar',
ht: 'Hull Trains',
tl: 'Thameslink',
gc: 'Grand Central',
gx: 'Gatwick Express',
hx: 'Heathrow Express',
ls: 'Locomotive Services Limited',
me: 'Merseyrail',
lr: 'Network Rail OTM',
xr: 'TfL Elizabeth Line',
se: 'SouthEastern',
sn: 'Southern',
le: 'Greater Anglia',
lm: 'West Midlands Railway',
sr: 'ScotRail',
gn: 'Great Northern',
lt: 'TfL London Underground',
lo: 'TfL London Overground',
sj: 'Sheffield SuperTram',
tp: 'TransPennine Express',
vt: 'Avanti West Coast',
gr: 'LNER',
wc: 'West Coast Railway',
ty: 'Vintage Trains',
ld: 'Lumo',
so: 'Rail Adventure',
ln: 'Grand Union Trains',
zz: 'Freight/Charter Company',
wm: 'West Midlands Railway (WMT)',
uk: 'Unknown Operator'
};
const tocs = new Map<string, string>([
['uk', 'Unknown Operator'],
['wm', 'West Midlands Railway (WMT)'],
['zz', 'Freight/Charter Operation'],
['ln', 'Grand Union Trains'],
['so', 'Rail Adventure']
])
export default tocMap;
export { tocs }
export const tocs = new Map<string, string>([
[ 'gw', 'Great Western Railway' ],
[ 'sw', 'South Western Railway' ],
[ 'id', 'Island Line' ],
[ 'nt', 'Northern' ],
[ 'aw', 'Transport for Wales' ],
[ 'cc', 'c2c' ],
[ 'cs', 'Caledonian Sleeper' ],
[ 'ch', 'Chiltern Railways' ],
[ 'xc', 'CrossCountry' ],
[ 'em', 'East Midlands Railway' ],
[ 'es', 'Eurostar' ],
[ 'ht', 'Hull Trains' ],
[ 'tl', 'Thameslink' ],
[ 'gc', 'Grand Central' ],
[ 'gx', 'Gatwick Express' ],
[ 'hx', 'Heathrow Express' ],
[ 'ls', 'Locomotive Services Limited' ],
[ 'me', 'Merseyrail' ],
[ 'lr', 'Network Rail OTM' ],
[ 'xr', 'TfL Elizabeth Line' ],
[ 'se', 'Southeastern' ],
[ 'sn', 'Southern' ],
[ 'le', 'Greater Anglia' ],
[ 'ga', 'Greater Anglia' ],
[ 'lm', 'West Midlands Railway' ],
[ 'sr', 'ScotRail' ],
[ 'gn', 'Great Northern' ],
[ 'lt', 'TfL London Underground' ],
[ 'lo', 'TfL London Overground' ],
[ 'sj', 'Sheffield SuperTram' ],
[ 'tp', 'TransPennine Express' ],
[ 'vt', 'Avanti West Coast' ],
[ 'gr', 'LNER' ],
[ 'wc', 'West Coast Railway' ],
[ 'ty', 'Vintage Trains' ],
[ 'ld', 'Lumo' ],
[ 'so', 'Rail Adventure' ],
[ 'ln', 'Grand Union Trains' ],
[ 'zz', 'Freight/Charter Company' ],
[ 'wm', 'West Midlands Railway (WMT)' ],
[ 'uk', 'Unknown Operator' ]
]
)