© 2026 Hedgehog Software, LLC
exactOptionalPropertyTypes
The types of 'hooks.after' are incompatible between these types.
Type 'HookEndpointContext<{ returned: unknown; }>' is not assignable to type '{ body: { [x: string]: any; }; params?: Record<string, string>; method: Method; headers?: Headers; request?: Request<unknown, CfProperties<unknown>>; query: any; _flag?: "json" | "router" | "default"; asResponse?: boolean; context: any; path: string; setHeader: (key: string, value: string) => void; setCookie: (key: string, value: string, options?: CookieOptions | undefined) => void; getCookie: (key: string, prefix?: CookiePrefixOptions | undefined) => string | undefined; setSignedCookie: (key: string, value: string, secret: string | BufferSource, options?: CookieOptions | undefined) => Promise<void>; getSignedCookie: (key: string, secret: string, prefix?: CookiePrefixOptions | undefined) => Promise<string | undefined>; redirect: (url: string) => APIError; json: <T>(body: T, option?: { status?: number; statusText?: string; headers?: Record<string, string>; body?: any; } | undefined) => { response: { body: any; status: number; statusText: string; headers: Record<string, string> | undefined; }; body: T; _flag: "json"; }; responseHeader: Headers; }' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties. Types of property 'params' are incompatible. Type 'Record<string, string> | undefined' is not assignable to type 'Record<string, string>'. Type 'undefined' is not assignable to type 'Record<string, string>'.ts(2322)