Moved some server only types like `RouteConfig` into server/. They were previously in runtime/.
16 lines
361 B
TypeScript
16 lines
361 B
TypeScript
/** @jsx h */
|
|
import { h } from "preact";
|
|
import { PageProps, RouteConfig } from "$fresh/server.ts";
|
|
|
|
export default function WildcardPage({ params }: PageProps) {
|
|
if (typeof params.path === "string") {
|
|
return <p>{params.path}</p>;
|
|
} else {
|
|
return <p>Not a string.</p>;
|
|
}
|
|
}
|
|
|
|
export const config: RouteConfig = {
|
|
routeOverride: "/foo/:path*",
|
|
};
|