fix(compiler-sfc): add semicolon after `defineProps` statement (#6461)
fix #6428
This commit is contained in:
parent
97aadd8290
commit
b72a4af38a
|
@ -640,7 +640,7 @@ export default {
|
|||
setup(__props, { expose }) {
|
||||
expose();
|
||||
|
||||
const props = __props
|
||||
const props = __props;
|
||||
|
||||
|
||||
|
||||
|
@ -658,7 +658,7 @@ export default {
|
|||
setup(__props, { expose }) {
|
||||
expose();
|
||||
|
||||
const props = __props
|
||||
const props = __props;
|
||||
|
||||
|
||||
return { props, x }
|
||||
|
@ -675,7 +675,7 @@ exports[`SFC compile <script setup> defineProps() 1`] = `
|
|||
setup(__props, { expose }) {
|
||||
expose();
|
||||
|
||||
const props = __props
|
||||
const props = __props;
|
||||
|
||||
|
||||
const bar = 1
|
||||
|
@ -693,7 +693,7 @@ exports[`SFC compile <script setup> defineProps/defineEmits in multi-variable de
|
|||
setup(__props, { expose, emit }) {
|
||||
expose();
|
||||
|
||||
const props = __props
|
||||
const props = __props;
|
||||
|
||||
|
||||
|
||||
|
@ -710,7 +710,7 @@ exports[`SFC compile <script setup> defineProps/defineEmits in multi-variable de
|
|||
setup(__props, { expose, emit }) {
|
||||
expose();
|
||||
|
||||
const props = __props
|
||||
const props = __props;
|
||||
|
||||
const a = 1;
|
||||
|
||||
|
@ -1611,7 +1611,7 @@ export default /*#__PURE__*/_defineComponent({
|
|||
setup(__props, { expose, emit }) {
|
||||
expose();
|
||||
|
||||
const props = __props
|
||||
const props = __props;
|
||||
|
||||
|
||||
|
||||
|
@ -1705,7 +1705,7 @@ const props = __props as {
|
|||
foo?: string
|
||||
bar?: number
|
||||
baz: boolean
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
@ -1728,7 +1728,7 @@ export default /*#__PURE__*/_defineComponent({
|
|||
setup(__props: any, { expose }) {
|
||||
expose();
|
||||
|
||||
const props = __props as { foo: string, bar?: number, baz: boolean, qux(): number }
|
||||
const props = __props as { foo: string, bar?: number, baz: boolean, qux(): number };
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1411,7 +1411,7 @@ export function compileScript(
|
|||
startOffset,
|
||||
`\nconst ${propsIdentifier} = __props${
|
||||
propsTypeDecl ? ` as ${genSetupPropsType(propsTypeDecl)}` : ``
|
||||
}\n`
|
||||
};\n`
|
||||
)
|
||||
}
|
||||
if (propsDestructureRestId) {
|
||||
|
|
Loading…
Reference in New Issue