Rebasely Beta: data may be purged

justintypescript-ultra-strict Public

Text · 9 lines · 321 B · at 83c2f03

import { type Option, type Result } from "@tsus/runtime";export type RouteMatch = { route: string; params: Record<string, string> };export type RouteError = { kind: "invalid_route"; route: string };export const matchRoute = (routes: string[], path: string): Result<Option<RouteMatch>, RouteError> => {  // TODO};