This repository was archived by the owner on Dec 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ function isAsyncImport(node: any) {
1111 if ( node . type === 'VariableDeclaration' ) {
1212 const declaration = node . declarations [ 0 ]
1313
14- return declaration . init . callee != null
15- && declaration . init . callee . name === 'defineAsyncComponent'
14+ return declaration ?. init ?. callee ?. name === 'defineAsyncComponent'
1615 }
1716
1817 return false
Original file line number Diff line number Diff line change @@ -509,6 +509,7 @@ exports[`transform fixtures test/fixtures/RefSugar.vue 1`] = `
509509 <div>
510510 { { msg }}
511511 { { msg2 }}
512+ { { a }}
512513 </div>
513514</template>
514515
@@ -534,8 +535,11 @@ const __sfc_main = defineComponent({
534535__sfc_main.setup = (__props, __ctx) => {
535536 let msg2 = _ref (' hello world' );
536537
538+ let a : number ;
539+ a = 2 ;
537540 return {
538- msg2
541+ msg2 ,
542+ a
539543 };
540544} ;
541545
Original file line number Diff line number Diff line change 22 <div >
33 {{ msg }}
44 {{ msg2 }}
5+ {{ a }}
56 </div >
67</template >
78
@@ -23,4 +24,8 @@ export default defineComponent({
2324
2425<script setup lang="ts">
2526let msg2 = $ref (' hello world' )
27+
28+ let a: number
29+
30+ a = 2
2631 </script >
You can’t perform that action at this time.
0 commit comments