import type { Context } from '@midwayjs/koa'; import type { ICookies, SetOption } from 'cookies'; import type { Request, Response } from 'express'; import type { FastifyReply, FastifyRequest } from 'fastify'; import type { RouterContext } from 'koa-router'; export interface ExpressContext { request: Request; response: Response; } export interface FastifyContext { request: FastifyRequest & { query: Request['query']; path: undefined; }; response: FastifyReply & { setHeader: undefined; }; } type IKoaContext = Omit & { cookies: Omit, 'set'> & { set?: (name: string, value?: string | null, opts?: SetOption) => IKoaContext['cookies']; }; }; export type ISSRNestContext = ExpressContext & T; export type ISSRFastifyContext = FastifyContext & T; export type ISSRMidwayContext = IKoaContext & T; export type ISSRMidwayKoaContext = Context & T; export type ISSRContext = ISSRMidwayKoaContext | ISSRNestContext | ISSRMidwayContext | ISSRFastifyContext; export interface Options { mode?: string; } export interface IWindow { __USE_SSR__?: boolean; __INITIAL_DATA__?: any; __INITIAL_PINIA_DATA__?: any; STORE_CONTEXT?: any; __USE_VITE__?: boolean; prefix?: string; clientPrefix?: string; microApp?: any; hashRouter: boolean; ssrDevInfo: { manifest: Record; rootId: string; fePort?: number; https?: boolean; }; } export {}; //# sourceMappingURL=ctx.d.ts.map