This repository was archived by the owner on Dec 25, 2024. It is now read-only.
File tree 3 files changed +11
-3
lines changed
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) {
11
11
if ( node . type === 'VariableDeclaration' ) {
12
12
const declaration = node . declarations [ 0 ]
13
13
14
- return declaration . init . callee != null
15
- && declaration . init . callee . name === 'defineAsyncComponent'
14
+ return declaration ?. init ?. callee ?. name === 'defineAsyncComponent'
16
15
}
17
16
18
17
return false
Original file line number Diff line number Diff line change @@ -509,6 +509,7 @@ exports[`transform fixtures test/fixtures/RefSugar.vue 1`] = `
509
509
<div>
510
510
{ { msg }}
511
511
{ { msg2 }}
512
+ { { a }}
512
513
</div>
513
514
</template>
514
515
@@ -534,8 +535,11 @@ const __sfc_main = defineComponent({
534
535
__sfc_main.setup = (__props, __ctx) => {
535
536
let msg2 = _ref (' hello world' );
536
537
538
+ let a : number ;
539
+ a = 2 ;
537
540
return {
538
- msg2
541
+ msg2 ,
542
+ a
539
543
};
540
544
} ;
541
545
Original file line number Diff line number Diff line change 2
2
<div >
3
3
{{ msg }}
4
4
{{ msg2 }}
5
+ {{ a }}
5
6
</div >
6
7
</template >
7
8
@@ -23,4 +24,8 @@ export default defineComponent({
23
24
24
25
<script setup lang="ts">
25
26
let msg2 = $ref (' hello world' )
27
+
28
+ let a: number
29
+
30
+ a = 2
26
31
</script >
You can’t perform that action at this time.
0 commit comments