Skip to content

Commit 8baf1cb

Browse files
committed
Revert "refactor: typing ExecuteOptions"
This reverts commit 2447160.
1 parent 11064de commit 8baf1cb

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { VitestExecutor, ExecuteOptions } from '../runtime/execute'
1+
export { VitestExecutor } from '../runtime/execute'

packages/web-worker/src/runner.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import type { ExecuteOptions } from 'vitest/execute'
21
import { VitestExecutor } from 'vitest/execute'
32

43
export class InlineWorkerRunner extends VitestExecutor {
5-
constructor(options: ExecuteOptions, private context: any) {
4+
constructor(options: any, private context: any) {
65
// share the same mocker as main executor
76
const mocker = (globalThis as any).__vitest_mocker__
87
super(options)

packages/web-worker/src/shared-worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function createSharedWorkerConstructor(): typeof SharedWorker {
135135

136136
return runner.executeFile(fsPath).then(() => {
137137
// worker should be new every time, invalidate its sub dependency
138-
runnerOptions.moduleCache!.invalidateSubDepTree([
138+
runnerOptions.moduleCache.invalidateSubDepTree([
139139
fsPath,
140140
runner.mocker.getMockPath(fsPath),
141141
])

packages/web-worker/src/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { readFileSync as _readFileSync } from 'node:fs'
22
import type { WorkerGlobalState } from 'vitest'
33
import ponyfillStructuredClone from '@ungap/structured-clone'
44
import createDebug from 'debug'
5-
import type { ExecuteOptions } from 'vitest/execute'
65
import type { CloneOption } from './types'
76

87
// keep the reference in case it was mocked
@@ -80,7 +79,7 @@ export function createMessageEvent(
8079
}
8180
}
8281

83-
export function getRunnerOptions(): ExecuteOptions {
82+
export function getRunnerOptions(): any {
8483
const state = getWorkerState()
8584
const { config, rpc, moduleCache } = state
8685

packages/web-worker/src/worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export function createWorkerConstructor(
132132

133133
return runner.executeFile(fsPath).then(() => {
134134
// worker should be new every time, invalidate its sub dependency
135-
runnerOptions.moduleCache!.invalidateSubDepTree([
135+
runnerOptions.moduleCache.invalidateSubDepTree([
136136
fsPath,
137137
runner.mocker.getMockPath(fsPath),
138138
])

0 commit comments

Comments
 (0)