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

<script setup lang="tsx"> not works with withDefaults #1458

Closed
Max-Loo opened this issue Jun 14, 2022 · 1 comment
Closed

<script setup lang="tsx"> not works with withDefaults #1458

Max-Loo opened this issue Jun 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Max-Loo
Copy link

Max-Loo commented Jun 14, 2022

Repository

https://github.com/Max-Loo/volar-bug-reproduce/tree/bug/1

Version

volar: 0.37.8

Description

  • When using setup lang="tsx" and withDefaults at the same time. property used in template can not be recognized.
    image

  • After changing tsx into ts, everying is good.
    image

  • Or removing the withDefaults, everying is good.
    image

Expectation

  • <script setup lang="tsx"> can work with withDefaults
@johnsoncodehk johnsoncodehk added the bug Something isn't working label Jun 14, 2022
@Max-Loo
Copy link
Author

Max-Loo commented Jun 14, 2022

What's more. When downgrade the volar's version from 0.37.8 to 0.37.7. The error Property 'data' does not exist on type '{}'.ts(2339) will gone, but the property willl be recognized as type any

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants