-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
fix(compiler-sfc): fix macro definition to preserve semicolons in some sceniarios #7810
Conversation
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.
<script setup lang="ts">
console.log('Oups...')
const a = defineProps(['b'])
(window.testFunc) = () => 'props'
</script>
<script setup lang="ts">
console.log('Oups...')
const a = defineProps(['b']);
(window.testFunc) = () => 'props'
</script>
<script setup lang="ts">
console.log('Oups...')
defineProps(['b'])
;(window.testFunc) = () => 'props'
</script>
This case will still report an error
@@ -1277,7 +1290,6 @@ const emit = defineEmits(['a', 'b']) | |||
expect(content).toMatch(`emits: ["foo", "bar"]`) | |||
}) | |||
|
|||
|
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.
Avoid adding or subtracting unnecessary spaces
@@ -1136,7 +1149,7 @@ const emit = defineEmits(['a', 'b']) | |||
`) | |||
assertCode(content) | |||
}) | |||
|
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.
Avoid adding or subtracting unnecessary spaces
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.
ok,thans
I think the first are not necessary |
fix #7805