dev #160
54
src/types/format.ts
Normal file
54
src/types/format.ts
Normal file
@ -0,0 +1,54 @@
|
||||
declare global {
|
||||
interface map {
|
||||
zoom: number
|
||||
center: {
|
||||
lat: number
|
||||
lng: number
|
||||
}
|
||||
}
|
||||
|
||||
interface geoloc {
|
||||
latlon: [number, number]
|
||||
notes: string
|
||||
}
|
||||
|
||||
interface leg {
|
||||
title: string
|
||||
step_title: string[]
|
||||
date_range: [Date, Date] | null
|
||||
map: map
|
||||
travel: unknown[]
|
||||
hotel: geoloc | null
|
||||
places: {
|
||||
restaurants: geoloc[]
|
||||
places: geoloc[]
|
||||
}
|
||||
notes: string
|
||||
}
|
||||
|
||||
interface journey {
|
||||
title: string
|
||||
name: string | null
|
||||
main: leg[]
|
||||
}
|
||||
}
|
||||
|
||||
const journey_template: journey = {
|
||||
title: "New Journey",
|
||||
name: null,
|
||||
main: [],
|
||||
}
|
||||
|
||||
const leg_template: leg = {
|
||||
title: "New Leg",
|
||||
step_title: [],
|
||||
map: { zoom: 2, center: { lng: 0, lat: 0 } },
|
||||
travel: [],
|
||||
hotel: null,
|
||||
places: { restaurants: [], places: [] },
|
||||
notes: "",
|
||||
date_range: null
|
||||
}
|
||||
|
||||
export { map, geoloc, leg, journey }
|
||||
export { journey_template, leg_template }
|
Loading…
x
Reference in New Issue
Block a user