Skip to content

Commit 5261df0

Browse files
authored
fix(types): ensure Chai declaration merge works with TS-Go (#8188)
1 parent 89a1cb6 commit 5261df0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/vitest/src/types/global.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ import type { UserConsoleLog } from './general'
77
declare global {
88
// eslint-disable-next-line ts/no-namespace
99
namespace Chai {
10+
interface ContainSubset {
11+
(expected: any): Assertion
12+
}
13+
1014
interface Assertion {
11-
containSubset: (expected: any) => Assertion
15+
containSubset: ContainSubset
1216
}
17+
1318
interface Assert {
14-
containSubset: (val: any, exp: any, msg?: string) => void
19+
// eslint-disable-next-line ts/method-signature-style
20+
containSubset(val: any, exp: any, msg?: string): void
1521
}
1622
}
1723
}

0 commit comments

Comments
 (0)