Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readonly warnings are not shown in template syntax #12929

Open
Rikk010 opened this issue Feb 23, 2025 · 0 comments · May be fixed by #12934
Open

Readonly warnings are not shown in template syntax #12929

Rikk010 opened this issue Feb 23, 2025 · 0 comments · May be fixed by #12934

Comments

@Rikk010
Copy link

Rikk010 commented Feb 23, 2025

Vue version

3.5.13

Link to minimal reproduction

https://play.vuejs.org/#eNp9ks1uwjAQhF/F8gUqoXBoTzSg/ohDK7VULUdf0sQBg2Nb9pofobx7106BpEUcvTM7+sb2gT4ak2w8pyOautwKA8Rx8GbClKiMtkAOxPKS1KS0uiI9tPY6UlZoJfcd/Z4ppnKtHJBqP+c7IOOQ0e8JJUBkkmwyibabsy3XZj8rT9Yms98sR1vpVQ5CK+JNkQF/i0r/5sAUaS0nMRgjerAUjhSaO7LNrELimql02BTEangAXhmJUXgiJP32AJj+kEuRr8eMdoBaaUrDbyKdzP9N02GTczmzjd5Z/7OaDltsdEDB4SWVYpGsnFb4TrF0QKyMkNzOTLgYx+iIRCVomZR6+xpnYD0fHOf5kufrC/OV24UZox+WO243nNGTBpldcAQO8vTrPcKfxEoXXqL7ivjJnZY+MDa2J68KxG75Iu1L/FJCLeZuugOu3LFUAA3OOvoZxR/2fKX6Gfc2uYt7+Pi0/gG/wgAI

Steps to reproduce

Open te playground and look at the code. No need to interact with the outputted app.

What is expected?

The template syntax should also be underlined that you are not allowed to assign a value to readonly.

What is actually happening?

Please check out the difference in setup vs template syntax. The updateMyText function warns that copyOfText shoud not be assigned to as it is readonly. However, this warning is not present when trying to assign a value in the template syntax (e.q @click='copyOfText = 'new value'.

System Info

N/A

Any additional comments?

The readonly functionality itself does work, but the code is not highlighted causing hard to find bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants