connector-facebook: drop ambiguous Response annotations (type-hoisting collision)
This commit is contained in:
parent
ac969f05c9
commit
c31762b82d
1 changed files with 3 additions and 3 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue