Skip to content

Commit 4def55e

Browse files
authored
fix: typo & redirect signature (#1218)
1 parent bfd64ec commit 4def55e

File tree

1 file changed

+4
-4
lines changed
  • src/routes/solid-router/reference/response-helpers

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ When returning from a nested method, the parent method will continue to execute,
6464
### TypeScript Signature
6565

6666
```typescript
67-
interface ResponseOptions & Omit<ResponseInit, "body"> {
67+
type RouterResponseInit = Omit<ResponseInit, "body"> & {
6868
revalidate?: string | string[];
69-
} | number
69+
};
7070

71-
function redirect(url: string, opts = 302): CustomResponse<never>;
71+
function redirect(url: string, init?: number | RouterResponseInit): CustomResponse<never>;
7272
```
7373

74-
The `ResponseOptions` extens the types from the native [`ResponseInit`](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options) interface.
74+
The `ResponseOptions` extends the types from the native [`ResponseInit`](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options) interface.

0 commit comments

Comments
 (0)