major: import Fresh 2.0 code (#2449)

🎉
This commit is contained in:
Marvin Hagemeister
2024-05-24 09:40:08 +02:00
committed by GitHub
parent 990357629e
commit 287929e4d2
958 changed files with 15794 additions and 28287 deletions
+16
View File
@@ -0,0 +1,16 @@
import type { FunctionComponent } from "preact";
import type { FreshContext } from "../../context.ts";
/**
* The mode Fresh can run in.
*/
export type Mode = "development" | "build" | "production";
export let MODE: Mode = "production";
export function setMode(mode: Mode) {
MODE = mode;
}
export type PageProps<Data = unknown, T = unknown> =
& Omit<FreshContext<Data, T>, "next" | "redirect" | "next">
& { Component: FunctionComponent };