Skip to content

Commit

Permalink
feat: RFC 436 Leaves Experimental (#2545)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Mar 25, 2023
1 parent 8a7d552 commit 836043a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
Expand Up @@ -53,6 +53,12 @@
},
"bypassDefineComponentToExposePropsAndEmitsForJsScriptSetupComponents": {
"deprecated": true
},
"experimentalRfc436": {
"deprecated": true,
"type": "boolean",
"default": false,
"markdownDescription": "This flag is no longer needed after v1.4.0.\n\n[RFC](https://github.com/vuejs/rfcs/discussions/436)"
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions packages/vue-language-core/schemas/vue-tsconfig.schema.json
Expand Up @@ -93,11 +93,6 @@
],
"markdownDescription": "https://github.com/johnsoncodehk/volar/issues/1038, https://github.com/johnsoncodehk/volar/issues/1121"
},
"experimentalRfc436": {
"type": "boolean",
"default": false,
"markdownDescription": "https://github.com/vuejs/rfcs/discussions/436"
},
"experimentalUseElementAccessInTemplate": {
"type": "boolean",
"default": false,
Expand Down
5 changes: 4 additions & 1 deletion packages/vue-language-core/src/generators/script.ts
Expand Up @@ -76,7 +76,7 @@ export function generate(
ConstructorOverloads: false,
WithTemplateSlots: false,
};
const generateFunctionType = !!vueCompilerOptions.experimentalRfc436 && !!sfc.scriptSetup?.generic;
const generateFunctionType = !!sfc.scriptSetup?.generic;

writeScriptSrc();
writeScriptSetupImportsSegment();
Expand Down Expand Up @@ -309,6 +309,9 @@ export function generate(
sfc.scriptSetup.genericOffset,
FileRangeCapabilities.full,
]);
if (!sfc.scriptSetup.generic.endsWith(',')) {
codeGen.push(`,`);
}
codeGen.push(`>`);
}
codeGen.push('(');
Expand Down
1 change: 0 additions & 1 deletion packages/vue-language-core/src/types.ts
Expand Up @@ -33,7 +33,6 @@ export interface VueCompilerOptions {

// experimental
experimentalResolveStyleCssClasses: 'scoped' | 'always' | 'never';
experimentalRfc436: boolean;
experimentalModelPropName: Record<string, Record<string, boolean | Record<string, string> | Record<string, string>[]>>;
experimentalUseElementAccessInTemplate: boolean;
experimentalAdditionalLanguageModules: string[];
Expand Down
1 change: 0 additions & 1 deletion packages/vue-language-core/src/utils/ts.ts
Expand Up @@ -209,7 +209,6 @@ export function resolveVueCompilerOptions(vueOptions: Partial<VueCompilerOptions
// experimental
experimentalAdditionalLanguageModules: vueOptions.experimentalAdditionalLanguageModules ?? [],
experimentalResolveStyleCssClasses: vueOptions.experimentalResolveStyleCssClasses ?? 'scoped',
experimentalRfc436: vueOptions.experimentalRfc436 ?? false,
// https://github.com/vuejs/vue-next/blob/master/packages/compiler-dom/src/transforms/vModel.ts#L49-L51
// https://vuejs.org/guide/essentials/forms.html#form-input-bindings
experimentalModelPropName: vueOptions.experimentalModelPropName ?? {
Expand Down

0 comments on commit 836043a

Please sign in to comment.