Skip to content
Permalink
Browse files
fix(compiler-sfc): add semicolon after defineProps statement (#6461)
fix #6428
  • Loading branch information
sxzz committed Nov 8, 2022
1 parent 97aadd8 commit b72a4af38a402447d19b4616d09935c390d0702f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
@@ -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) {

0 comments on commit b72a4af

Please sign in to comment.