Remix migration
This commit is contained in:
27
index.d.ts
vendored
27
index.d.ts
vendored
@ -1,8 +1,8 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
import { type PageContextBuiltIn } from "vite-plugin-ssr";
|
||||
import type { EmotionCache } from "@emotion/utils";
|
||||
|
||||
declare global {
|
||||
module "*.css";
|
||||
|
||||
interface Env {
|
||||
ASSETS: Fetcher;
|
||||
DATA: KVNamespace;
|
||||
@ -10,15 +10,20 @@ declare global {
|
||||
}
|
||||
|
||||
type RequestContext = EventContext<Env, string, { [k: string]: any }>;
|
||||
interface PageContext extends PageContextBuiltIn {
|
||||
current_user?: { [k: string]: any };
|
||||
kv: KVNamespace;
|
||||
pageProps: {
|
||||
[k: string]: any;
|
||||
};
|
||||
requireAuth?: boolean;
|
||||
status: number;
|
||||
|
||||
interface EmotionCriticalToChunks {
|
||||
html: string;
|
||||
styles: { key: string; ids: string[]; css: string }[];
|
||||
}
|
||||
|
||||
interface EmotionServer {
|
||||
constructStyleTagsFromChunks: (
|
||||
criticalData: EmotionCriticalToChunks
|
||||
) => string;
|
||||
extractCriticalToChunks: (html: string) => EmotionCriticalToChunks;
|
||||
}
|
||||
|
||||
export function createEmotionServer(cache: EmotionCache): EmotionServer;
|
||||
}
|
||||
|
||||
export {};
|
||||
|
Reference in New Issue
Block a user