Skip to content

Commit 5cbd9e4

Browse files
Sync svelte docs (#1545)
sync svelte docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent 29bd212 commit 5cbd9e4

File tree

4 files changed

+35
-38
lines changed

4 files changed

+35
-38
lines changed

apps/svelte.dev/content/docs/svelte/98-reference/.generated/server-errors.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
<!-- This file is generated by scripts/process-messages/index.js. Do not edit! -->
22

3+
### await_invalid
4+
5+
```
6+
Encountered asynchronous work while rendering synchronously.
7+
```
8+
9+
You (or the framework you're using) called [`render(...)`](svelte-server#render) with a component containing an `await` expression. Either `await` the result of `render` or wrap the `await` (or the component containing it) in a [`<svelte:boundary>`](svelte-boundary) with a `pending` snippet.
10+
11+
### html_deprecated
12+
13+
```
14+
The `html` property of server render results has been deprecated. Use `body` instead.
15+
```
16+
317
### lifecycle_function_unavailable
418

519
```
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- This file is generated by scripts/process-messages/index.js. Do not edit! -->
2+
3+
### experimental_async_ssr
4+
5+
```
6+
Attempted to use asynchronous rendering without `experimental.async` enabled
7+
```
8+
9+
Set `experimental.async: true` in your compiler options (usually in `svelte.config.js`) to use async server rendering. This render ran synchronously.

apps/svelte.dev/content/docs/svelte/98-reference/.generated/shared-errors.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
<!-- This file is generated by scripts/process-messages/index.js. Do not edit! -->
22

3-
### await_outside_boundary
4-
5-
```
6-
Cannot await outside a `<svelte:boundary>` with a `pending` snippet
7-
```
8-
9-
The `await` keyword can only appear in a `$derived(...)` or template expression, or at the top level of a component's `<script>` block, if it is inside a [`<svelte:boundary>`](/docs/svelte/svelte-boundary) that has a `pending` snippet:
10-
11-
```svelte
12-
<svelte:boundary>
13-
<p>{await getData()}</p>
14-
15-
{#snippet pending()}
16-
<p>loading...</p>
17-
{/snippet}
18-
</svelte:boundary>
19-
```
20-
21-
This restriction may be lifted in a future version of Svelte.
22-
233
### invalid_default_snippet
244

255
```

apps/svelte.dev/content/docs/svelte/98-reference/30-runtime-errors.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -271,38 +271,32 @@ If it's possible to resolve the error inside the `onerror` callback, you must at
271271

272272
<!-- This file is generated by scripts/process-messages/index.js. Do not edit! -->
273273

274-
### lifecycle_function_unavailable
274+
### await_invalid
275275

276276
```
277-
`%name%(...)` is not available on the server
277+
Encountered asynchronous work while rendering synchronously.
278278
```
279279

280-
Certain methods such as `mount` cannot be invoked while running in a server context. Avoid calling them eagerly, i.e. not during render.
281-
280+
You (or the framework you're using) called [`render(...)`](svelte-server#render) with a component containing an `await` expression. Either `await` the result of `render` or wrap the `await` (or the component containing it) in a [`<svelte:boundary>`](svelte-boundary) with a `pending` snippet.
282281

283-
## Shared errors
282+
### html_deprecated
284283

285-
<!-- This file is generated by scripts/process-messages/index.js. Do not edit! -->
284+
```
285+
The `html` property of server render results has been deprecated. Use `body` instead.
286+
```
286287

287-
### await_outside_boundary
288+
### lifecycle_function_unavailable
288289

289290
```
290-
Cannot await outside a `<svelte:boundary>` with a `pending` snippet
291+
`%name%(...)` is not available on the server
291292
```
292293

293-
The `await` keyword can only appear in a `$derived(...)` or template expression, or at the top level of a component's `<script>` block, if it is inside a [`<svelte:boundary>`](/docs/svelte/svelte-boundary) that has a `pending` snippet:
294+
Certain methods such as `mount` cannot be invoked while running in a server context. Avoid calling them eagerly, i.e. not during render.
294295

295-
```svelte
296-
<svelte:boundary>
297-
<p>{await getData()}</p>
298296

299-
{#snippet pending()}
300-
<p>loading...</p>
301-
{/snippet}
302-
</svelte:boundary>
303-
```
297+
## Shared errors
304298

305-
This restriction may be lifted in a future version of Svelte.
299+
<!-- This file is generated by scripts/process-messages/index.js. Do not edit! -->
306300

307301
### invalid_default_snippet
308302

0 commit comments

Comments
 (0)