fix(compiler-sfc): do not skip TSInstantiationExpression when transforming props destructure #12064
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix this kind of edge case
Steps to reproduce
https://play.vuejs.org/#eNp9UsFu2zAM/RVClyZA4By2k+cY24oO2A5bsQU76eLajKtWlgSJyjJk/vdRUtKlw9aTLfKRfO+RR/HOuWofUdSiIZyc7ghbaQCaD9ZCve90xI0Ui6Gjbrlp00cKWDOkWV/g+Rl6rxxBQIqOI2py1hOkLjtvJ5CiWl/bKQ+T4k2qLxWMFStBobdmp8bqIVjDZI6JgxQ9VyiN/osjZU2QooacSblOa/vjU46Rj7g6x/t77B//EX8IhxST4tZjQL9nGk856vyIVNI33z7jgf+fkpMdomb0C8mvGKyOiWOBvY9mYNoXuMz2YzZFmXEbbg6EJpxFJaIJOWe8FGxSMut/0v/QfVW9znXSzOzi2eC0zct9gO7MyGskbsN+00+HeTMbaLbAetAMAQJ5Zga/wMTpDn2bd17DdgmbFvZWDdLwjgLBEfJZwMz1A+6UwVtvXWhO8Tq3ntvFMt1FKen6JILxWcJ9l92pYZF7n2QlpNVYaTsurr7nCSrUV6vStSn0Wm5a5MKzE+LH8/O9i0Q88W2vVf/I0guD6jQ625CGXqd0LliXir8vW8y/AWviDAE=
Click button. See error.
What is expected?
Value prop should be accessible even when used with
console.log('Value is:', value<string>)
Although the user probably won't use it this way.
And it can be used this way in the TS Playground
What is actually happening?
Errro