File tree 3 files changed +9
-3
lines changed
extensions/vscode-vue-language-features/schemas
packages/vue-typescript/src
3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 17
17
"markdownDescription" : " https://github.com/johnsoncodehk/volar/pull/351"
18
18
},
19
19
"experimentalImplicitWrapComponentOptionsWithDefineComponent" : {
20
- "type" : " boolean" ,
20
+ "enum" : [
21
+ true ,
22
+ false ,
23
+ " onlyJs"
24
+ ],
21
25
"markdownDescription" : " Implicit wrap object literal component options export with `defineComponent()`."
22
26
},
23
27
"experimentalTemplateCompilerOptions" : {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export interface ITemplateScriptData {
12
12
13
13
export interface VueCompilerOptions {
14
14
experimentalCompatMode ?: 2 | 3 ;
15
- experimentalImplicitWrapComponentOptionsWithDefineComponent ?: boolean ;
15
+ experimentalImplicitWrapComponentOptionsWithDefineComponent ?: boolean | 'onlyJs' ;
16
16
experimentalTemplateCompilerOptions ?: any ;
17
17
experimentalTemplateCompilerOptionsRequirePath ?: string ;
18
18
experimentalDisableTemplateSupport ?: boolean ;
Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ export function useSfcScriptGen<T extends 'template' | 'script'>(
46
46
return bindTexts ;
47
47
} ,
48
48
getVueLibraryName ( compilerOptions . experimentalCompatMode === 2 ) ,
49
- ! ! compilerOptions . experimentalImplicitWrapComponentOptionsWithDefineComponent ,
49
+ ( compilerOptions . experimentalImplicitWrapComponentOptionsWithDefineComponent ?? 'onlyJs' ) === 'onlyJs'
50
+ ? lang . value === 'js' || lang . value === 'jsx'
51
+ : ! ! compilerOptions . experimentalImplicitWrapComponentOptionsWithDefineComponent ,
50
52
)
51
53
) ;
52
54
const file = computed ( ( ) => {
You can’t perform that action at this time.
0 commit comments