Files
SnowLuma/.pnpm-store/v11/files/f4/911a0e3f940ce28a624ef6e8a6d34c1b45a48e29e1a4fd146efd3decda96b88f1a208e2c07d23b41c447ec0fb8d43cf00965cdce10a33cd1b30be22f41768b
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

47 lines
1.4 KiB
Plaintext

import { Env, MiddlewareHandler } from "../../types.js";
import { Context } from "../../context.js";
//#region src/helper/ssg/middleware.d.ts
export declare const SSG_CONTEXT = "HONO_SSG_CONTEXT";
export declare const X_HONO_DISABLE_SSG_HEADER_KEY = "x-hono-disable-ssg";
/**
* @deprecated
* Use `X_HONO_DISABLE_SSG_HEADER_KEY` instead.
* This constant will be removed in the next minor version.
*/
export declare const SSG_DISABLED_RESPONSE: Response;
interface SSGParam {
[key: string]: string;
}
export type SSGParams = SSGParam[];
interface SSGParamsMiddleware {
<E extends Env = Env>(generateParams: (c: Context<E>) => SSGParams | Promise<SSGParams>): MiddlewareHandler<E>;
<E extends Env = Env>(params: SSGParams): MiddlewareHandler<E>;
}
export type AddedSSGDataRequest = Request & {
ssgParams?: SSGParams;
};
/**
* Define SSG Route
*/
export declare const ssgParams: SSGParamsMiddleware;
/**
* @experimental
* `isSSGContext` is an experimental feature.
* The API might be changed.
*/
export declare const isSSGContext: (c: Context) => boolean;
/**
* @experimental
* `disableSSG` is an experimental feature.
* The API might be changed.
*/
export declare const disableSSG: () => MiddlewareHandler;
/**
* @experimental
* `onlySSG` is an experimental feature.
* The API might be changed.
*/
export declare const onlySSG: () => MiddlewareHandler;
//#endregion
export {};