Skip to content

Commit eeaac3f

Browse files
committed
revert fix
1 parent 352f35a commit eeaac3f

File tree

4 files changed

+1
-8
lines changed

4 files changed

+1
-8
lines changed

packages/vue-language-core/src/generators/script.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,6 @@ declare function defineProp<T>(value?: T | (() => T), required?: boolean, rest?:
927927
},
928928
emptyLocalVars,
929929
identifiers,
930-
new Set(),
931930
vueCompilerOptions,
932931
);
933932
codes.push(';\n');

packages/vue-language-core/src/generators/template.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ export function generate(
7474
sfc: Sfc,
7575
hasScriptSetupSlots: boolean,
7676
slotsAssignName: string | undefined,
77-
propsAssignName: string | undefined,
7877
codegenStack: boolean,
7978
) {
8079

@@ -1893,7 +1892,7 @@ export function generate(
18931892
}
18941893
codes.push(addSuffix);
18951894
}
1896-
}, localVars, identifiers, new Set([propsAssignName ?? '']), vueCompilerOptions);
1895+
}, localVars, identifiers, vueCompilerOptions);
18971896
if (start !== undefined) {
18981897
for (const v of vars) {
18991898
v.offset = start + v.offset - prefix.length;

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,21 +152,18 @@ function createTsx(fileName: string, _sfc: Sfc, { vueCompilerOptions, compilerOp
152152
_sfc,
153153
hasScriptSetupSlots.value,
154154
slotsAssignName.value,
155-
propsAssignName.value,
156155
codegenStack,
157156
);
158157
});
159158

160159
//#region remove when https://github.com/vuejs/core/pull/5912 merged
161160
const hasScriptSetupSlots = ref(false);
162161
const slotsAssignName = ref<string>();
163-
const propsAssignName = ref<string>();
164162
//#endregion
165163

166164
const tsxGen = computed(() => {
167165
hasScriptSetupSlots.value = !!scriptSetupRanges.value?.defineSlots;
168166
slotsAssignName.value = scriptSetupRanges.value?.slotsAssignName;
169-
propsAssignName.value = scriptSetupRanges.value?.propsAssignName;
170167
return genScript(
171168
ts,
172169
fileName,

packages/vue-language-core/src/utils/transform.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export function walkInterpolationFragment(
99
cb: (fragment: string, offset: number | undefined, isJustForErrorMapping?: boolean) => void,
1010
localVars: Record<string, number>,
1111
identifiers: Set<string>,
12-
skipVars: Set<string>,
1312
vueOptions: VueCompilerOptions,
1413
) {
1514

@@ -22,7 +21,6 @@ export function walkInterpolationFragment(
2221
const varCb = (id: ts.Identifier, isShorthand: boolean) => {
2322
if (
2423
!!localVars[id.text] ||
25-
skipVars.has(id.text) ||
2624
// https://github.com/vuejs/core/blob/245230e135152900189f13a4281302de45fdcfaa/packages/compiler-core/src/transforms/transformExpression.ts#L342-L352
2725
isGloballyWhitelisted(id.text) ||
2826
id.text === 'require' ||

0 commit comments

Comments
 (0)