Skip to content

Commit 7191859

Browse files
committed
Prettier
1 parent e96ead1 commit 7191859

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

packages/openapi-fetch/examples/nextjs/app/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ async function getFact() {
99
next: {
1010
revalidate: 10,
1111
tags: ["cat"],
12-
}
12+
},
1313
});
1414
}
1515

packages/openapi-fetch/src/index.d.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,12 @@ export type RequestBodyOption<T> =
108108
: { body: OperationRequestBodyContent<T> };
109109

110110
export type FetchOptions<T> = RequestOptions<T> &
111-
Omit<RequestInit, "body" | "headers"> & NextJsFetchOptions;
111+
Omit<RequestInit, "body" | "headers"> &
112+
NextJsFetchOptions;
112113

113-
export type NextJsFetchOptions =
114-
{next?: {revalidate?: false | 0 | number, tags?: string[]}};
114+
export type NextJsFetchOptions = {
115+
next?: { revalidate?: false | 0 | number; tags?: string[] };
116+
};
115117

116118
/** This type helper makes the 2nd function param required if params/requestBody are required; otherwise, optional */
117119
export type MaybeOptionalInit<P extends {}, M extends keyof P> =

packages/openapi-fetch/src/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ export default function createClient(clientOptions) {
9898
}
9999

100100
// fetch!
101-
let response = await fetch(request, init.next ? {next: init.next} : undefined);
101+
let response = await fetch(
102+
request,
103+
init.next ? { next: init.next } : undefined,
104+
);
102105

103106
// middleware (response)
104107
// execute in reverse-array order (first priority gets last transform)

0 commit comments

Comments
 (0)