ts-quiz— ~/quiz/levels.ts
tsc --watch● loading…
// tsc --watch · type-checking modules…
await load("quiz/levels.ts")
// streaming server components
◇ tsc 6.0.3 · compiling…UTF-8◇ scanning levels…
satisfies RouteMap change-t-il le typage de routes par rapport à une annotation : RouteMap ?type Method = "GET" | "POST";
type RouteMap = Record<string, { method: Method; auth: boolean }>;
const routes = {
home: { method: "GET", auth: false },
admin: { method: "POST", auth: true },
} satisfies RouteMap;
routes.home.method; // ?
routes.unknown; // ?