@@ -73,10 +73,7 @@ export async function preTranspileScriptSetup(sfc: SFCDescriptor, id: string): P
7373 }
7474}
7575
76- function processDefineProps (
77- node : Expression ,
78- context : Context ,
79- ) : string | undefined {
76+ function processDefineProps ( node : Expression , context : Context ) : string | undefined {
8077 if ( ! isCallOf ( node , DEFINE_PROPS ) ) {
8178 return
8279 }
@@ -114,10 +111,7 @@ function processDefineProps(
114111
115112 return generate ( node ) . code
116113}
117- function processDefineEmits (
118- node : Expression ,
119- context : Context ,
120- ) : string | undefined {
114+ function processDefineEmits ( node : Expression , context : Context ) : string | undefined {
121115 if ( ! isCallOf ( node , DEFINE_EMITS ) ) {
122116 return
123117 }
@@ -154,10 +148,7 @@ function processDefineEmits(
154148
155149 return generate ( node ) . code
156150}
157- function processWithDefaults (
158- node : Expression ,
159- context : Context ,
160- ) : string | undefined {
151+ function processWithDefaults ( node : Expression , context : Context ) : string | undefined {
161152 if ( ! isCallOf ( node , WITH_DEFAULTS ) ) {
162153 return
163154 }
@@ -187,10 +178,7 @@ function processWithDefaults(
187178
188179 return res
189180}
190- function processDefineModel (
191- node : Expression ,
192- context : Context ,
193- ) : string | undefined {
181+ function processDefineModel ( node : Expression , context : Context ) : string | undefined {
194182 if ( ! isCallOf ( node , DEFINE_MODEL ) ) {
195183 return
196184 }
@@ -249,10 +237,7 @@ function processDefineModel(
249237 return generate ( node ) . code
250238}
251239
252- function getDefineModelRuntimeDecl (
253- node : CallExpression ,
254- context : Context ,
255- ) : [ StringLiteral | undefined , ObjectExpression | undefined ] {
240+ function getDefineModelRuntimeDecl ( node : CallExpression , context : Context ) : [ StringLiteral | undefined , ObjectExpression | undefined ] {
256241 const [ arg0 , arg1 ] = node . arguments
257242 if ( arg0 && arg0 . type === 'StringLiteral' ) {
258243 if ( arg1 && arg1 . type !== 'ObjectExpression' ) {
@@ -272,10 +257,7 @@ function getDefineModelRuntimeDecl(
272257 return [ undefined , arg0 as ObjectExpression | undefined ]
273258}
274259
275- async function prepareContext (
276- { script, scriptSetup } : SFCDescriptor & { scriptSetup : SFCScriptBlock } ,
277- id : string ,
278- ) : Promise < Context > {
260+ async function prepareContext ( { script, scriptSetup } : SFCDescriptor & { scriptSetup : SFCScriptBlock } , id : string ) : Promise < Context > {
279261 const { extractRuntimeProps, extractRuntimeEmits, inferRuntimeType, MagicString } = await import ( 'vue/compiler-sfc' )
280262
281263 const helper = new Set < string > ( )
0 commit comments