Skip to content

Commit 4972119

Browse files
committed
refactor(language-core): remove unused codegen options
1 parent 35e2c5a commit 4972119

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

packages/language-core/lib/codegen/script/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as path from 'path-browserify';
2-
import type * as ts from 'typescript';
32
import type { ScriptRanges } from '../../parsers/scriptRanges';
43
import type { ScriptSetupRanges } from '../../parsers/scriptSetupRanges';
54
import type { Code, Sfc, SfcBlock, VueCompilerOptions } from '../../types';
@@ -15,14 +14,12 @@ import { generateTemplate } from './template';
1514
const exportExpression = `{} as typeof ${names._export}`;
1615

1716
export interface ScriptCodegenOptions {
18-
ts: typeof ts;
1917
vueCompilerOptions: VueCompilerOptions;
2018
script: Sfc['script'];
2119
scriptSetup: Sfc['scriptSetup'];
2220
fileName: string;
2321
scriptRanges: ScriptRanges | undefined;
2422
scriptSetupRanges: ScriptSetupRanges | undefined;
25-
templateStartTagOffset: number | undefined;
2623
templateCodegen: TemplateCodegenContext & { codes: Code[] } | undefined;
2724
styleCodegen: TemplateCodegenContext & { codes: Code[] } | undefined;
2825
setupExposed: Set<string>;

packages/language-core/lib/plugins/vue-tsx.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,6 @@ function useCodegen(
188188
});
189189
});
190190

191-
const getTemplateStartTagOffset = computed(() => {
192-
if (sfc.template) {
193-
return sfc.template.start - sfc.template.startTagEnd;
194-
}
195-
});
196-
197191
const getSetupExposed = computedSet(() => {
198192
const allVars = new Set<string>();
199193
const scriptSetupRanges = getScriptSetupRanges();
@@ -240,7 +234,6 @@ function useCodegen(
240234

241235
const getGeneratedScript = computed(() => {
242236
return generateScript({
243-
ts,
244237
vueCompilerOptions: getResolvedOptions(),
245238
script: sfc.script,
246239
scriptSetup: sfc.scriptSetup,
@@ -249,7 +242,6 @@ function useCodegen(
249242
scriptRanges: getScriptRanges(),
250243
scriptSetupRanges: getScriptSetupRanges(),
251244
templateCodegen: getGeneratedTemplate(),
252-
templateStartTagOffset: getTemplateStartTagOffset(),
253245
styleCodegen: getGeneratedStyle(),
254246
});
255247
});

0 commit comments

Comments
 (0)