fix(frontend): type jsonHandler body as JsonBodyType

CI's pnpm types step caught that http[method](...) needs MSW's
JsonBodyType, not unknown.
This commit is contained in:
abhi1992002
2026-04-29 19:56:33 +05:30
parent eb1d2e9667
commit d98cdae394

View File

@@ -1,4 +1,4 @@
import { http, HttpResponse } from "msw";
import { http, HttpResponse, type JsonBodyType } from "msw";
import { describe, expect, it } from "vitest";
import { server } from "@/mocks/mock-server";
@@ -28,7 +28,7 @@ const COPILOT_USAGE_RESPONSE = {
const INVOICES_RESPONSE: never[] = [];
function jsonHandler(method: "get" | "post", path: string, body: unknown) {
function jsonHandler(method: "get" | "post", path: string, body: JsonBodyType) {
return http[method](`*${path}`, () => HttpResponse.json(body));
}