SIGN IN SIGN UP
sveltejs / svelte UNCLAIMED

web development for the rest of us

0 0 69 JavaScript

feat: allow declarations in the template (#18282)

Allows `{let/const ...}` declarations in all places (and more) where we
already allow `{@const ...}` (which will eventually get deprecated in
favor of this new feature).

Closes: #16490


Companion PRs:
- https://github.com/sveltejs/language-tools/pull/3033
- https://github.com/sveltejs/prettier-plugin-svelte/pull/533
- https://github.com/sveltejs/eslint-plugin-svelte/pull/1533
- https://github.com/sveltejs/svelte-eslint-parser/pull/891

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
S
Simon H committed
59d3a36f825d9f2ca29dbdbec0ad27e4f5bf1105
Parent: 656dae6
Committed by GitHub <noreply@github.com> on 5/29/2026, 12:05:13 PM