Skip to content

Commit f9b389e

Browse files
authored
generate kit docs from repo (#292)
* generate kit docs from repo - closes #185 * sync again
1 parent c4e7af1 commit f9b389e

20 files changed

+604
-1885
lines changed

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

Lines changed: 431 additions & 1772 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ first post-processing
7878

7979
<div class="ts-block">
8080

81-
```ts
82-
// @noErrors
81+
```dts
8382
function sequence(
8483
...handlers: import('@sveltejs/kit').Handle[]
8584
): import('@sveltejs/kit').Handle;
@@ -88,3 +87,5 @@ function sequence(
8887
</div>
8988

9089

90+
91+

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ Make various web APIs available as globals:
1717

1818
<div class="ts-block">
1919

20-
```ts
21-
// @noErrors
20+
```dts
2221
function installPolyfills(): void;
2322
```
2423

2524
</div>
2625

2726

27+
28+

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,19 @@ Converts a file on disk to a readable stream
1919

2020
<div class="ts-block">
2121

22-
```ts
23-
// @noErrors
22+
```dts
2423
function createReadableStream(file: string): ReadableStream;
2524
```
2625

2726
</div>
2827

29-
## getRequest
3028

3129

30+
## getRequest
3231

3332
<div class="ts-block">
3433

35-
```ts
36-
// @noErrors
34+
```dts
3735
function getRequest({
3836
request,
3937
base,
@@ -47,14 +45,13 @@ function getRequest({
4745

4846
</div>
4947

50-
## setResponse
5148

5249

50+
## setResponse
5351

5452
<div class="ts-block">
5553

56-
```ts
57-
// @noErrors
54+
```dts
5855
function setResponse(
5956
res: import('http').ServerResponse,
6057
response: Response
@@ -64,3 +61,5 @@ function setResponse(
6461
</div>
6562

6663

64+
65+

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ Returns the SvelteKit Vite plugins.
1515

1616
<div class="ts-block">
1717

18-
```ts
19-
// @noErrors
18+
```dts
2019
function sveltekit(): Promise<import('vite').Plugin[]>;
2120
```
2221

2322
</div>
2423

2524

25+
26+

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,50 +15,54 @@ import { browser, building, dev, version } from '$app/environment';
1515

1616
<div class="ts-block">
1717

18-
```ts
19-
// @noErrors
18+
```dts
2019
const browser: boolean;
2120
```
2221

2322
</div>
2423

24+
25+
2526
## building
2627

2728
SvelteKit analyses your app during the `build` step by running it. During this process, `building` is `true`. This also applies during prerendering.
2829

2930
<div class="ts-block">
3031

31-
```ts
32-
// @noErrors
32+
```dts
3333
const building: boolean;
3434
```
3535

3636
</div>
3737

38+
39+
3840
## dev
3941

4042
Whether the dev server is running. This is not guaranteed to correspond to `NODE_ENV` or `MODE`.
4143

4244
<div class="ts-block">
4345

44-
```ts
45-
// @noErrors
46+
```dts
4647
const dev: boolean;
4748
```
4849

4950
</div>
5051

52+
53+
5154
## version
5255

5356
The value of `config.kit.version.name`.
5457

5558
<div class="ts-block">
5659

57-
```ts
58-
// @noErrors
60+
```dts
5961
const version: string;
6062
```
6163

6264
</div>
6365

6466

67+
68+

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ In case of an error, it redirects to the nearest error page.
1616

1717
<div class="ts-block">
1818

19-
```ts
20-
// @noErrors
19+
```dts
2120
function applyAction<
2221
Success extends Record<string, unknown> | undefined,
2322
Failure extends Record<string, unknown> | undefined
@@ -31,6 +30,8 @@ function applyAction<
3130

3231
</div>
3332

33+
34+
3435
## deserialize
3536

3637
Use this function to deserialize the response from a form submission.
@@ -53,8 +54,7 @@ async function handleSubmit(event) {
5354

5455
<div class="ts-block">
5556

56-
```ts
57-
// @noErrors
57+
```dts
5858
function deserialize<
5959
Success extends Record<string, unknown> | undefined,
6060
Failure extends Record<string, unknown> | undefined
@@ -65,6 +65,8 @@ function deserialize<
6565

6666
</div>
6767

68+
69+
6870
## enhance
6971

7072
This action enhances a `<form>` element that otherwise would work without JavaScript.
@@ -86,8 +88,7 @@ If you provide a custom function with a callback and want to use the default beh
8688

8789
<div class="ts-block">
8890

89-
```ts
90-
// @noErrors
91+
```dts
9192
function enhance<
9293
Success extends Record<string, unknown> | undefined,
9394
Failure extends Record<string, unknown> | undefined
@@ -105,3 +106,5 @@ function enhance<
105106
</div>
106107

107108

109+
110+

0 commit comments

Comments
 (0)