-
-
Notifications
You must be signed in to change notification settings - Fork 502
refactor(language-core): rewrite a subset of template node transforms #5769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
vue-component-meta
vue-component-type-helpers
@vue/language-core
@vue/language-plugin-pug
@vue/language-server
@vue/language-service
vue-tsc
@vue/typescript-plugin
commit: |
2df73c5 to
ec9da65
Compare
| <div v-else-if="cond1.length"></div> | ||
|
|
||
| <template #default v-if="cond1 === true">1</template> | ||
| <template #default v-else-if="cond1.length">2</template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the fixture of v-else-if="cond1.length" is for checking type narrowing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the combination of v-slot and v-if is no longer a special case, we should no need to repeat existing test cases for type narrowing.
fix #4539, fix #5492, fix vuejs/core#12258, close #5765
This change simplifies the transforms of the template AST, in particular by removing all
codegenNodethat existed only for runtime codegen purpose. This also results in an AST shape that is more favorable for language tools integration.