-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Describe the bug
Input
class Repo {
tree = $state();
async #tree() {
// load it
}
}
Output
NOTE: In browser console only
SyntaxError: Identifier '#tree' has already been declared
// generated
{
// ...
#tree = $.state();
get tree() {
return $.get(this.#tree);
}
set tree(value) {
$.set(this.#tree, $.proxy(value, null, this.#tree));
}
}
Two ideal fixes/outcomes:
- devtools (compiler + vscode extension) would have told me
#tree
is reserved at time of authoring - the generated code uses something like
#__tree
instead.
Reproduction
included above
Logs
System Info
npmPackages:
svelte: ^5.0.5 => 5.0.5
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels