forked from vuejs/language-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(language-core): prevent visiting functional components for parseS…
…criptSetupRanges (vuejs#5049)
- Loading branch information
1 parent
209717c
commit 526ce74
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 10 additions & 1 deletion
11
test-workspace/tsc/passedFixtures/vue3/templateRef/main.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
<script setup lang="ts"> | ||
import TemplateRef from './template-ref.vue'; | ||
import { useTemplateRef } from 'vue'; | ||
import { exactType } from '../../shared'; | ||
import TemplateRef from './template-ref.vue'; | ||
function Comp() { | ||
const foo = useTemplateRef('templateRef'); | ||
exactType(foo.value, {} as unknown); | ||
return ''; | ||
} | ||
</script> | ||
|
||
<template> | ||
<TemplateRef ref="templateRef" /> | ||
|
||
{{ exactType($refs.templateRef?.$refs.generic?.foo, {} as (1 | undefined)) }} | ||
|
||
<Comp /> | ||
</template> |