We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62c9292 commit e6b5ccdCopy full SHA for e6b5ccd
.changeset/neat-dingos-clap.md
@@ -0,0 +1,5 @@
1
+---
2
+'svelte': patch
3
4
+
5
+fix: tweak invalid dollar prefix rules around function args
packages/svelte/src/compiler/phases/scope.js
@@ -73,7 +73,13 @@ export class Scope {
73
error(node, 'invalid-dollar-binding');
74
}
75
76
- if (node.name.startsWith('$') && declaration_kind !== 'synthetic' && this.function_depth <= 1) {
+ if (
77
+ node.name.startsWith('$') &&
78
+ declaration_kind !== 'synthetic' &&
79
+ declaration_kind !== 'param' &&
80
+ declaration_kind !== 'rest_param' &&
81
+ this.function_depth <= 1
82
+ ) {
83
error(node, 'invalid-dollar-prefix');
84
85
0 commit comments