update docs

pull/7451/head
Conduitry 4 years ago
parent 0d4eb0230d
commit 7c1f4e873e

@ -465,16 +465,16 @@ The `{@const ...}` tag defines a local constant.
```sv ```sv
<script> <script>
export let boxes; export let boxes;
</script> </script>
{#each boxes as box} {#each boxes as box}
{@const area = box.width * box.height} {@const area = box.width * box.height}
{box.width} * {box.height} = {area} {box.width} * {box.height} = {area}
{/each} {/each}
``` ```
`{@const}` is only allowed as direct child of `{#each}`, `{:then}`, `{:catch}`, `<Component />` or `<svelte:fragment />`. `{@const}` is only allowed as direct child of `{#if}`, `{:else if}`, `{:else}`, `{#each}`, `{:then}`, `{:catch}`, `<Component />` or `<svelte:fragment />`.
### Element directives ### Element directives

Loading…
Cancel
Save