@@ -572,9 +572,9 @@ export function compileScript(
572
572
return `\n props: ${ propsDecls } as unknown as undefined,`
573
573
}
574
574
575
- function genSetupPropsArgs (
575
+ function genSetupPropsType (
576
576
props : Record < string , PropTypeData > ,
577
- propsArgs : string
577
+ propsType : string
578
578
) {
579
579
const keys = Object . keys ( props )
580
580
if ( ! keys . length ) {
@@ -594,12 +594,12 @@ export function compileScript(
594
594
if ( prop ) {
595
595
const { required } = props [ key ]
596
596
if ( ! required ) {
597
- propsArgs = propsArgs . replace ( `${ key } ?` , key )
597
+ propsType = propsType . replace ( `${ key } ?` , key )
598
598
}
599
599
}
600
600
}
601
601
} )
602
- return `: ${ propsArgs } `
602
+ return `: ${ propsType } `
603
603
}
604
604
605
605
// 1. process normal <script> first if it exists
@@ -1020,11 +1020,11 @@ export function compileScript(
1020
1020
// 9. finalize setup() argument signature
1021
1021
let args = `__props`
1022
1022
if ( propsTypeDecl ) {
1023
- const propsArgs = `${ scriptSetup . content . slice (
1023
+ const propsType = `${ scriptSetup . content . slice (
1024
1024
propsTypeDecl . start ! ,
1025
1025
propsTypeDecl . end !
1026
1026
) } `
1027
- args += genSetupPropsArgs ( typeDeclaredProps , propsArgs )
1027
+ args += genSetupPropsType ( typeDeclaredProps , propsType )
1028
1028
}
1029
1029
// inject user assignment of props
1030
1030
// we use a default __props so that template expressions referencing props
0 commit comments