From 4cc6140d86f3e7d3e25a195a57496618a8429953 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 10 Feb 2026 22:05:49 +0000 Subject: [PATCH] Add typing --- src/routes/+page.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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[] }; };