Compiler crashes in some situations when the word "zoom?" is present
Version
3.2.33
Reproduction link
Steps to reproduce
The component (see the link) makes the compiler crash
It has something to do with the
- "zoom" (even it's a comment)
- "const props ="
What is expected?
The compiler compiles
What is actually happening?
The compiler crashes
This will be fine.
Example
<script lang="ts">
</script>
<script setup lang="ts">
interface Props {
// zoom?
a?: string;
}
const props = withDefaults(defineProps<Props>(), {
a: "a",
});
</script>
@liulinboyi But Volar (VSCode extension) complains about the Props
Moving the interface is recommended by Volar creator: https://github.com/johnsoncodehk/volar/issues/1232#issuecomment-1108042567
I noticed this bug too, is the PR submitted by @edison1105 ready to be merged? I see that all checks passed, is it waiting for a specific approval?
I noticed this bug too, is the PR submitted by @edison1105 ready to be merged? I see that all checks passed, is it waiting for a specific approval?
waiting for Evan's review.
I have a similar error, created a repository to show it https://github.com/vaban-ru/vue-tsc-reproduction-issue
This is a documented feature and not working. I wonder why the fix still not merged, it has been 8 months..
Fixed by naming prop primary something else
Can you give more details? const primary = defineProps<Props>()
didn't help. Also tried const primarySomething = ...
.