fix(compiler-sfc): should not rewrite ref sugar identifiers in types

fix #4062
This commit is contained in:
Evan You
2021-07-05 14:41:53 -04:00
parent 09f84e98c9
commit 6fad2093a4
4 changed files with 248 additions and 1 deletions

View File

@@ -1708,6 +1708,9 @@ export function walkIdentifiers(
;(walk as any)(root, {
enter(node: Node & { scopeIds?: Set<string> }, parent: Node | undefined) {
parent && parentStack.push(parent)
if (node.type.startsWith('TS')) {
return this.skip()
}
if (node.type === 'Identifier') {
if (
!knownIds[node.name] &&