fix(compiler-sfc): fix ref sugar rewrite for identifiers in ts casting expressions
fix #4254
This commit is contained in:
@@ -1781,7 +1781,12 @@ 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')) {
|
||||
if (
|
||||
parent &&
|
||||
parent.type.startsWith('TS') &&
|
||||
parent.type !== 'TSAsExpression' &&
|
||||
parent.type !== 'TSNonNullExpression'
|
||||
) {
|
||||
return this.skip()
|
||||
}
|
||||
if (onNode && onNode(node, parent!, parentStack) === false) {
|
||||
|
||||
Reference in New Issue
Block a user