You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect you would be able to default a snippet parameter like you can when writing a regular function, however the parser doesn't currently handle that case.
<script>
import Box from './Box.svelte';
</script><Box>{#snippet children(data={foo: 'foo',bar: 'bar'})}{data.foo}{data.bar}{/snippet}
</Box>
CompileError: Expected token )
at ar (compiler.cjs@5.0.0-next.18:1:228313)
at qn.eat (compiler.cjs@5.0.0-next.18:1:290576)
at eval (compiler.cjs@5.0.0-next.18:1:281813)
at Pn (compiler.cjs@5.0.0-next.18:1:282074)
at new qn (compiler.cjs@5.0.0-next.18:1:286529)
at Ln (compiler.cjs@5.0.0-next.18:1:292001)
at e.compile (compiler.cjs@5.0.0-next.18:1:640150)
at Object.transform (index-a870eda6.js:74:3556)
at index-a870eda6.js:55:31298
yy @ index-a870eda6.js:83
await in yy (async)
(anonymous) @ index-a870eda6.js:74
setTimeout (async)
(anonymous) @ index-a870eda6.js:74
System Info
REPL chrome
Severity
annoyance
The text was updated successfully, but these errors were encountered:
Describe the bug
I would expect you would be able to default a snippet parameter like you can when writing a regular function, however the parser doesn't currently handle that case.
Reproduction
REPL
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: