connector-facebook: drop ambiguous Response annotations (type-hoisting collision)

This commit is contained in:
glass beadian 2026-10-12 13:53:40 +00:00
parent ac969f05c9
commit c31762b82d

View file

@ -63,14 +63,14 @@ const pageAsset: MediaAsset = {
createdAt: new Date(),
};
function json(body: unknown, status = 200): Response {
function json(body: unknown, status = 200) {
return new Response(JSON.stringify(body), {
status,
headers: { "content-type": "application/json" },
});
}
function graphError(message: string, code: number, status = 400): Response {
function graphError(message: string, code: number, status = 400) {
return json({ error: { message, type: "OAuthException", code } }, status);
}
@ -94,7 +94,7 @@ const PAGES: Record<string, { name: string; username?: string; token: string }>
"/999888777": { name: "Other Page", token: "other-page-token" },
};
function stubGraph(state: StubState): typeof fetch {
function stubGraph(state: StubState) {
return async (input: Parameters<typeof fetch>[0], init?: RequestInit): Promise<Response> => {
const url = requestUrl(input);
const method = (init?.method ?? "GET").toUpperCase();