-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
"as" TypeScript keyword yields error within Vue template #12414
Comments
Any reference that this is allowed in Vue SFC? |
@fisker I don't know about any Vue doc covering this specific use case, so official support on this is unknown to me. However, AFAIK Vue 3 fully supports TypeScript and the For more context, prettier not only throws an error with the <p v-if="isFolder(file as mymodule.Folder)">test</p> |
Thank you. |
To add a bit more context: using the |
Original posted prettier/plugin-pug#365 (comment) That's a related issue from plugin. |
Prettier 2.5.1
Playground link
# Options: --parser vue --embedded-language-formatting auto --single-quote --tab-width 4 --print-width 120
Input:
Output:
Expected behavior:
prettier
should recognise TypeScript patterns such as theas
keyword within Vue templates. I believe this issue has to do with the--embedded-language-formatting
system not being able to parse the keyword, as when this option is set off the error is not given; however, setting this option off is not a suitable solution as it is quite useful.The text was updated successfully, but these errors were encountered: