From 5b4fb438837068d39c4032d76056334cdd8b4cfd Mon Sep 17 00:00:00 2001 From: so1ve Date: Sat, 23 Sep 2023 20:12:26 +0800 Subject: [PATCH] cleanup --- packages/vue-language-core/src/generators/script.ts | 1 - packages/vue-language-core/src/parsers/scriptSetupRanges.ts | 5 ----- 2 files changed, 6 deletions(-) diff --git a/packages/vue-language-core/src/generators/script.ts b/packages/vue-language-core/src/generators/script.ts index 7a07e98f5b..31b6e7e526 100644 --- a/packages/vue-language-core/src/generators/script.ts +++ b/packages/vue-language-core/src/generators/script.ts @@ -51,7 +51,6 @@ export function generate( emitsAssignName: undefined, emitsRuntimeArg: undefined, emitsTypeArg: undefined, - emitsTypeNums: 0, exposeRuntimeArg: undefined, leadingCommentEndOffset: 0, importSectionEndOffset: 0, diff --git a/packages/vue-language-core/src/parsers/scriptSetupRanges.ts b/packages/vue-language-core/src/parsers/scriptSetupRanges.ts index 2c0153d4ab..7c5b6ac832 100644 --- a/packages/vue-language-core/src/parsers/scriptSetupRanges.ts +++ b/packages/vue-language-core/src/parsers/scriptSetupRanges.ts @@ -22,7 +22,6 @@ export function parseScriptSetupRanges( let emitsRuntimeArg: TextRange | undefined; let emitsTypeArg: TextRange | undefined; let exposeRuntimeArg: TextRange | undefined; - let emitsTypeNums = -1; const definePropProposalA = vueCompilerOptions.experimentalDefinePropProposal === 'kevinEdition' || ast.getFullText().trimStart().startsWith('// @experimentalDefinePropProposal=kevinEdition'); const definePropProposalB = vueCompilerOptions.experimentalDefinePropProposal === 'johnsonEdition' || ast.getFullText().trimStart().startsWith('// @experimentalDefinePropProposal=johnsonEdition'); @@ -74,7 +73,6 @@ export function parseScriptSetupRanges( emitsAssignName, emitsRuntimeArg, emitsTypeArg, - emitsTypeNums, exposeRuntimeArg, defineProp, }; @@ -206,9 +204,6 @@ export function parseScriptSetupRanges( } if (vueCompilerOptions.macros.defineEmits.includes(callText)) { emitsTypeArg = _getStartEnd(typeArg); - if (ts.isTypeLiteralNode(typeArg)) { - emitsTypeNums = typeArg.members.length; - } if (ts.isVariableDeclaration(parent)) { emitsAssignName = parent.name.getText(ast); }