Skip to content

Commit

Permalink
Merge branch 'main' into fix-grammar-and-typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Nov 25, 2024
2 parents c386419 + 5f13526 commit 1013277
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/routes/solid-router/reference/response-helpers/json.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ Also read [action](/solid-router/reference/data-apis/action) and [revalidate](/s
## Type Signature

```typescript
interface ResponseOptions {
interface ResponseOptions & Omit<ResponseInit, "body"> {
revalidate?: string | string[];
}

json<T>(data: T, opt?: ResponseOptions): CustomResponse<T>;
```
```

The `ResponseOptions` extens the types from the native [`ResponseInit`](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options) interface.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ When returning from a nested method, the parent method will continue to execute,
### TypeScript Signature

```typescript
interface ResponseOptions {
interface ResponseOptions & Omit<ResponseInit, "body"> {
revalidate?: string | string[];
} | number

function redirect(url: string, opts = 302): CustomResponse<never>;
```

The `ResponseOptions` extens the types from the native [`ResponseInit`](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options) interface.
6 changes: 4 additions & 2 deletions src/routes/solid-router/reference/response-helpers/reload.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ To better understand how queries work, check the [query](/solid-router/reference
## TypeScript Signature

```ts
interface ResponseOptions {
interface ResponseOptions & Omit<ResponseInit, "body"> {
revalidate?: string | string[];
}

reload(opt?: ResponseOptions): CustomResponse<never>;
```
```

The `ResponseOptions` extens the types from the native [`ResponseInit`](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options) interface.
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ const updateTodo = action(async (todo: Todo) => {

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

0 comments on commit 1013277

Please sign in to comment.