Skip to content

Commit 8ec49bb

Browse files
committed
fix(resolveType): ignore nodes with @vue-ignore comments in resolveTypeReference
1 parent 99bbec5 commit 8ec49bb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/compiler-sfc/src/script/resolveType.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,13 @@ function resolveTypeReference(
728728
name?: string,
729729
onlyExported = false,
730730
): ScopeTypeNode | undefined {
731+
if (
732+
node.leadingComments &&
733+
node.leadingComments.some(c => c.value.includes('@vue-ignore'))
734+
) {
735+
return undefined
736+
}
737+
731738
const canCache = !scope?.isGenericScope
732739
if (canCache && node._resolvedReference) {
733740
return node._resolvedReference

0 commit comments

Comments
 (0)