Skip to content

Commit 18ae07a

Browse files
authored
chore: cleanup typos, remove any in VM executor (#3994)
1 parent dff60e8 commit 18ae07a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/vitest/src/runtime/external-executor.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export class ExternalModulesExecutor {
112112

113113
private wrapCoreSynteticModule(identifier: string, exports: Record<string, unknown>) {
114114
const moduleKeys = Object.keys(exports)
115-
const m: any = new SyntheticModule(
115+
const m = new SyntheticModule(
116116
[...moduleKeys, 'default'],
117117
() => {
118118
for (const key of moduleKeys)
@@ -130,7 +130,7 @@ export class ExternalModulesExecutor {
130130
private wrapCommonJsSynteticModule(identifier: string, exports: Record<string, unknown>) {
131131
// TODO: technically module should be parsed to find static exports, implement for strict mode in #2854
132132
const { keys, moduleExports, defaultExport } = interopCommonJsModule(this.options.interopDefault, exports)
133-
const m: any = new SyntheticModule(
133+
const m = new SyntheticModule(
134134
[...keys, 'default'],
135135
() => {
136136
for (const key of keys)

packages/vitest/src/runtime/vm/vite-executor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class ViteExecutor {
5858
return cached
5959
const result = await this.options.transform(fileUrl, 'web')
6060
if (!result.code)
61-
throw new Error(`[vitest] Failed to transform ${fileUrl}. Does the file exists?`)
61+
throw new Error(`[vitest] Failed to transform ${fileUrl}. Does the file exist?`)
6262
return this.esm.createEsModule(fileUrl, result.code)
6363
}
6464

0 commit comments

Comments
 (0)