Skip to content

Commit 5f13526

Browse files
committed
fix: Response type signature
1 parent a80c79a commit 5f13526

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

src/routes/solid-router/reference/response-helpers/json.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ Also read [action](/solid-router/reference/data-apis/action) and [revalidate](/s
2020
## Type Signature
2121

2222
```typescript
23-
interface ResponseOptions {
23+
interface ResponseOptions & Omit<ResponseInit, "body"> {
2424
revalidate?: string | string[];
2525
}
2626

2727
json<T>(data: T, opt?: ResponseOptions): CustomResponse<T>;
28-
```
28+
```
29+
30+
The `ResponseOptions` extens the types from the native [`ResponseInit`](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options) interface.

src/routes/solid-router/reference/response-helpers/redirect.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ When returning from a nested method, the parent method will continue to execute,
6363
### TypeScript Signature
6464

6565
```typescript
66-
interface ResponseOptions {
66+
interface ResponseOptions & Omit<ResponseInit, "body"> {
6767
revalidate?: string | string[];
6868
} | number
6969

7070
function redirect(url: string, opts = 302): CustomResponse<never>;
7171
```
72+
73+
The `ResponseOptions` extens the types from the native [`ResponseInit`](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options) interface.

src/routes/solid-router/reference/response-helpers/reload.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ To better understand how queries work, check the [query](/solid-router/reference
2222
## TypeScript Signature
2323

2424
```ts
25-
interface ResponseOptions {
25+
interface ResponseOptions & Omit<ResponseInit, "body"> {
2626
revalidate?: string | string[];
2727
}
2828

2929
reload(opt?: ResponseOptions): CustomResponse<never>;
30-
```
30+
```
31+
32+
The `ResponseOptions` extens the types from the native [`ResponseInit`](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options) interface.

src/routes/solid-router/reference/response-helpers/revalidate.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ const updateTodo = action(async (todo: Todo) => {
4040

4141
```ts
4242
function revalidate(key?: string | string[] | void, force?: boolean): Promise<void>;
43-
```
43+
```

0 commit comments

Comments
 (0)