Skip to content

Commit ce6af70

Browse files
fix(types): fix public types (#7328)
Co-authored-by: Vladimir <[email protected]>
1 parent bff70be commit ce6af70

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

packages/browser/jest-dom.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ declare namespace matchers {
260260
* @see
261261
* [testing-library/jest-dom#tohaveclass](https://github.com/testing-library/jest-dom#tohaveclass)
262262
*/
263-
toHaveClass(...classNames: Array<string | RegExp>): R
264263
toHaveClass(classNames: string, options?: {exact: boolean}): R
264+
toHaveClass(...classNames: Array<string | RegExp>): R
265265
/**
266266
* @description
267267
* This allows you to check whether the given form element has the specified displayed value (the one the

packages/browser/utils.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// we cannot bundle it because vitest depend on the @vitest/browser and vise versa
33
// fortunately, the file is quite small
44

5-
import { LocatorSelectors } from '@vitest/browser/context'
5+
import { LocatorSelectors, Locator } from '@vitest/browser/context'
66
import { StringifyOptions } from 'vitest/utils'
77

88
export type PrettyDOMOptions = Omit<StringifyOptions, 'maxLength'>

packages/vitest/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
},
124124
"peerDependencies": {
125125
"@edge-runtime/vm": "*",
126+
"@types/debug": "^4.1.12",
126127
"@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
127128
"@vitest/browser": "workspace:*",
128129
"@vitest/ui": "workspace:*",
@@ -133,6 +134,9 @@
133134
"@edge-runtime/vm": {
134135
"optional": true
135136
},
137+
"@types/debug": {
138+
"optional": true
139+
},
136140
"@types/node": {
137141
"optional": true
138142
},

packages/vitest/src/utils/debugger.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import type { Debugger } from 'debug'
12
import createDebug from 'debug'
23

3-
export function createDebugger(namespace: `vitest:${string}`) {
4+
export function createDebugger(namespace: `vitest:${string}`): Debugger | undefined {
45
const debug = createDebug(namespace)
56
if (debug.enabled) {
67
return debug

0 commit comments

Comments
 (0)