File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
src/typescript-reporter/extension/vue
test/e2e/fixtures/implementation Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ function createTypeScriptVueExtension(
112112 } else if ( isVueTemplateCompilerV3 ( compiler ) ) {
113113 const parsed = compiler . parse ( vueSourceText ) ;
114114
115- if ( parsed . descriptor && parsed . descriptor . script ) {
116- const scriptV3 = parsed . descriptor . script ;
115+ if ( parsed . descriptor && ( parsed . descriptor . script || parsed . descriptor . scriptSetup ) ) {
116+ const scriptV3 = ( parsed . descriptor . script || parsed . descriptor . scriptSetup ) ! ;
117117
118118 // map newer version of SFCScriptBlock to the generic one
119119 script = {
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ interface SFCDescriptor {
2323 filename : string ;
2424 template : SFCBlock | null ;
2525 script : SFCBlock | null ;
26+ scriptSetup : SFCBlock | null ;
2627 styles : SFCBlock [ ] ;
2728 customBlocks : SFCBlock [ ] ;
2829}
Original file line number Diff line number Diff line change 9292 </p>
9393</template>
9494
95- <script lang="ts">
95+ <script setup lang="ts">
9696import User, { getUserName } from '@/model/User';
9797
9898export default {
You can’t perform that action at this time.
0 commit comments