mirror of https://github.com/sveltejs/svelte
fix: support es2022 class features (#8355)
Follow up to #8349. We also have to bump the parsing ECMAScript version here. Fixes #6900, fixes #6592.pull/8371/head
parent
e2fe8ab469
commit
5c14bc5f01
@ -0,0 +1,25 @@
|
||||
/* generated by Svelte vX.Y.Z */
|
||||
import { SvelteComponent, init, safe_not_equal } from "svelte/internal";
|
||||
|
||||
function instance($$self) {
|
||||
class A {
|
||||
p1;
|
||||
p2 = 1;
|
||||
#p3 = 2;
|
||||
|
||||
#getP3() {
|
||||
return this.#p3;
|
||||
}
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
class Component extends SvelteComponent {
|
||||
constructor(options) {
|
||||
super();
|
||||
init(this, options, instance, null, safe_not_equal, {});
|
||||
}
|
||||
}
|
||||
|
||||
export default Component;
|
@ -0,0 +1,12 @@
|
||||
<script>
|
||||
class A {
|
||||
p1;
|
||||
p2 = 1;
|
||||
|
||||
#p3 = 2;
|
||||
|
||||
#getP3() {
|
||||
return this.#p3;
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in new issue