diff --git a/src/routes/+page.ts b/src/routes/+page.ts index c86edd5..e84bfa0 100644 --- a/src/routes/+page.ts +++ b/src/routes/+page.ts @@ -1,5 +1,14 @@ import type { PageLoad } from './$types'; +export interface RouteMapIndex { + routeId: string | number; + routeStart: string; + routeEnd: string; + created: string; + checked: string; + contents: string[]; +} + export const load: PageLoad = async ({ fetch }) => { const response = await fetch('map-index.json'); @@ -12,6 +21,6 @@ export const load: PageLoad = async ({ fetch }) => { return { maps: maps.sort((a: any, b: any) => { return Number(a.routeId) - Number(b.routeId); - }) + }) as RouteMapIndex[] }; };