mirror of https://github.com/sveltejs/svelte
fix: issue with implicit public modifier causing undefined properties (#14153)
closes #14152pull/14167/head
parent
ecc9b97a5b
commit
5077061695
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: error on TypeScript's `readonly` modifier
|
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "typescript_invalid_feature",
|
||||||
|
"message": "TypeScript language features like accessibility modifiers on constructor parameters are not natively supported, and their use is generally discouraged. Outside of `<script>` tags, these features are not supported. For use within `<script>` tags, you will need to use a preprocessor to convert it to JavaScript before it gets passed to the Svelte compiler. If you are using `vitePreprocess`, make sure to specifically enable preprocessing script tags (`vitePreprocess({ script: true })`)",
|
||||||
|
"start": {
|
||||||
|
"line": 3,
|
||||||
|
"column": 14
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 3,
|
||||||
|
"column": 32
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
@ -0,0 +1,5 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
class Foo {
|
||||||
|
constructor(readonly x: number) {}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in new issue