@@ -4,8 +4,14 @@ import '../types/global'
4
4
5
5
import type {
6
6
Custom as Custom_ ,
7
+ DoneCallback as DoneCallback_ ,
7
8
File as File_ ,
9
+ RuntimeContext as RuntimeContext_ ,
10
+ SuiteHooks as SuiteHooks_ ,
8
11
Suite as Suite_ ,
12
+ TaskBase as TaskBase_ ,
13
+ TaskResultPack as TaskResultPack_ ,
14
+ TaskResult as TaskResult_ ,
9
15
Task as Task_ ,
10
16
Test as Test_ ,
11
17
} from '@vitest/runner'
@@ -18,6 +24,10 @@ import type {
18
24
TscErrorInfo as TscErrorInfo_ ,
19
25
} from '../typecheck/types'
20
26
27
+ import type {
28
+ WorkerRPC as WorkerRPC_ ,
29
+ } from '../types/worker'
30
+
21
31
import type {
22
32
ArgumentsType as ArgumentsType_ ,
23
33
Arrayable as Arrayable_ ,
@@ -86,6 +96,9 @@ import type {
86
96
} from '../node/types/benchmark'
87
97
88
98
import type { SerializedTestSpecification } from '../runtime/types/utils'
99
+ import type {
100
+ WorkerContext as WorkerContext_ ,
101
+ } from '../node/types/worker'
89
102
90
103
export {
91
104
suite ,
@@ -137,34 +150,46 @@ export type Test = Test_
137
150
export type Custom = Custom_
138
151
/** @deprecated use `RunnerTask` instead */
139
152
export type Task = Task_
153
+ /** @deprecated use `RunnerTaskBase` instead */
154
+ export type TaskBase = TaskBase_
155
+ /** @deprecated use `RunnerTaskResult` instead */
156
+ export type TaskResult = TaskResult_
157
+ /** @deprecated use `RunnerTaskResultPack` instead */
158
+ export type TaskResultPack = TaskResultPack_
159
+
160
+ /** @deprecated don't use `DoneCallback` since it's not supported */
161
+ export type DoneCallback = DoneCallback_
162
+
163
+ /** @deprecated internal type, don't use it */
164
+ export type RuntimeContext = RuntimeContext_
165
+ /** @deprecated internal type, don't use it */
166
+ export type SuiteHooks = SuiteHooks_
140
167
141
168
export type {
142
169
RunMode ,
143
170
TaskState ,
144
- TaskBase ,
145
- TaskResult ,
146
- TaskResultPack ,
171
+ TaskBase as RunnerTaskBase ,
172
+ TaskResult as RunnerTaskResult ,
173
+ TaskResultPack as RunnerTaskResultPack ,
147
174
Suite as RunnerTestSuite ,
148
175
File as RunnerTestFile ,
149
176
Test as RunnerTestCase ,
150
177
Task as RunnerTask ,
151
178
Custom as RunnerCustomCase ,
152
- DoneCallback ,
153
179
TestFunction ,
154
180
TestOptions ,
155
181
TestAPI ,
156
182
SuiteAPI ,
157
183
HookListener ,
158
184
HookCleanupCallback ,
159
- SuiteHooks ,
160
185
SuiteCollector ,
161
186
SuiteFactory ,
162
- RuntimeContext ,
163
187
TestContext ,
164
188
TaskContext ,
165
189
ExtendedContext ,
166
190
TaskCustomOptions ,
167
191
OnTestFailedHandler ,
192
+ OnTestFinishedHandler ,
168
193
TaskMeta ,
169
194
} from '@vitest/runner'
170
195
export type {
@@ -182,17 +207,17 @@ export type {
182
207
SnapshotSerializer ,
183
208
} from '@vitest/snapshot'
184
209
210
+ /** @deprecated import from `vitest/node` instead */
211
+ export type WorkerContext = WorkerContext_
212
+ /** @deprecated import from `vitest/node` instead */
213
+ export type WorkerRPC = WorkerRPC_
214
+
185
215
export type {
186
216
ResolveIdFunction ,
187
- WorkerRPC ,
188
217
WorkerGlobalState ,
189
218
ContextTestEnvironment ,
190
219
ContextRPC ,
191
220
} from '../types/worker'
192
- export type {
193
- /** @deprecated import from `vitest/node` instead */
194
- WorkerContext ,
195
- } from '../node/types/worker'
196
221
197
222
/** @deprecated do not use, internal helper */
198
223
export type Awaitable < T > = Awaitable_ < T >
0 commit comments