@@ -4,8 +4,14 @@ import '../types/global'
44
55import type {
66 Custom as Custom_ ,
7+ DoneCallback as DoneCallback_ ,
78 File as File_ ,
9+ RuntimeContext as RuntimeContext_ ,
10+ SuiteHooks as SuiteHooks_ ,
811 Suite as Suite_ ,
12+ TaskBase as TaskBase_ ,
13+ TaskResultPack as TaskResultPack_ ,
14+ TaskResult as TaskResult_ ,
915 Task as Task_ ,
1016 Test as Test_ ,
1117} from '@vitest/runner'
@@ -18,6 +24,10 @@ import type {
1824 TscErrorInfo as TscErrorInfo_ ,
1925} from '../typecheck/types'
2026
27+ import type {
28+ WorkerRPC as WorkerRPC_ ,
29+ } from '../types/worker'
30+
2131import type {
2232 ArgumentsType as ArgumentsType_ ,
2333 Arrayable as Arrayable_ ,
@@ -86,6 +96,9 @@ import type {
8696} from '../node/types/benchmark'
8797
8898import type { SerializedTestSpecification } from '../runtime/types/utils'
99+ import type {
100+ WorkerContext as WorkerContext_ ,
101+ } from '../node/types/worker'
89102
90103export {
91104 suite ,
@@ -137,34 +150,46 @@ export type Test = Test_
137150export type Custom = Custom_
138151/** @deprecated use `RunnerTask` instead */
139152export 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_
140167
141168export type {
142169 RunMode ,
143170 TaskState ,
144- TaskBase ,
145- TaskResult ,
146- TaskResultPack ,
171+ TaskBase as RunnerTaskBase ,
172+ TaskResult as RunnerTaskResult ,
173+ TaskResultPack as RunnerTaskResultPack ,
147174 Suite as RunnerTestSuite ,
148175 File as RunnerTestFile ,
149176 Test as RunnerTestCase ,
150177 Task as RunnerTask ,
151178 Custom as RunnerCustomCase ,
152- DoneCallback ,
153179 TestFunction ,
154180 TestOptions ,
155181 TestAPI ,
156182 SuiteAPI ,
157183 HookListener ,
158184 HookCleanupCallback ,
159- SuiteHooks ,
160185 SuiteCollector ,
161186 SuiteFactory ,
162- RuntimeContext ,
163187 TestContext ,
164188 TaskContext ,
165189 ExtendedContext ,
166190 TaskCustomOptions ,
167191 OnTestFailedHandler ,
192+ OnTestFinishedHandler ,
168193 TaskMeta ,
169194} from '@vitest/runner'
170195export type {
@@ -182,17 +207,17 @@ export type {
182207 SnapshotSerializer ,
183208} from '@vitest/snapshot'
184209
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+
185215export type {
186216 ResolveIdFunction ,
187- WorkerRPC ,
188217 WorkerGlobalState ,
189218 ContextTestEnvironment ,
190219 ContextRPC ,
191220} from '../types/worker'
192- export type {
193- /** @deprecated import from `vitest/node` instead */
194- WorkerContext ,
195- } from '../node/types/worker'
196221
197222/** @deprecated do not use, internal helper */
198223export type Awaitable < T > = Awaitable_ < T >
0 commit comments