Skip to content

Commit fb894fc

Browse files
Sync kit docs (#1421)
sync kit docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent f602a39 commit fb894fc

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

apps/svelte.dev/content/docs/kit/98-reference/[email protected]

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Checks whether this is an error thrown by `error`.
150150
```dts
151151
function isHttpError<T extends number>(
152152
e: unknown,
153-
status?: T | undefined
153+
status?: T
154154
): e is HttpError_1 & {
155155
status: T extends undefined ? never : T;
156156
};
@@ -181,10 +181,7 @@ Create a JSON `Response` object from the supplied data.
181181
<div class="ts-block">
182182

183183
```dts
184-
function json(
185-
data: any,
186-
init?: ResponseInit | undefined
187-
): Response;
184+
function json(data: any, init?: ResponseInit): Response;
188185
```
189186

190187
</div>
@@ -267,10 +264,7 @@ Create a `Response` object from the supplied body.
267264
<div class="ts-block">
268265

269266
```dts
270-
function text(
271-
body: string,
272-
init?: ResponseInit | undefined
273-
): Response;
267+
function text(body: string, init?: ResponseInit): Response;
274268
```
275269

276270
</div>

apps/svelte.dev/content/docs/kit/98-reference/20-$app-navigation.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,16 @@ For external URLs, use `window.location = url` instead of calling `goto(url)`.
9595
```dts
9696
function goto(
9797
url: string | URL,
98-
opts?:
99-
| {
100-
replaceState?: boolean | undefined;
101-
noScroll?: boolean | undefined;
102-
keepFocus?: boolean | undefined;
103-
invalidateAll?: boolean | undefined;
104-
invalidate?:
105-
| (string | URL | ((url: URL) => boolean))[]
106-
| undefined;
107-
state?: App.PageState | undefined;
108-
}
109-
| undefined
98+
opts?: {
99+
replaceState?: boolean | undefined;
100+
noScroll?: boolean | undefined;
101+
keepFocus?: boolean | undefined;
102+
invalidateAll?: boolean | undefined;
103+
invalidate?:
104+
| (string | URL | ((url: URL) => boolean))[]
105+
| undefined;
106+
state?: App.PageState | undefined;
107+
}
110108
): Promise<void>;
111109
```
112110

0 commit comments

Comments
 (0)