Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc88d1f1

Browse files
authored
feat: HaveInverse exportable in types.ts (#15704)
1 parent74b51b9 commitc88d1f1

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
##main
22

3+
###Features
4+
5+
-`[expect]` Have`Inverse` exportable ([#15704](https://github.com/jestjs/jest/pull/15704))
6+
37
##30.0.3
48

59
###Fixes

‎packages/expect/src/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export type {
6363
BaseExpect,
6464
Expect,
6565
ExpectationResult,
66+
Inverse,
6667
MatcherContext,
6768
MatcherFunction,
6869
MatcherFunctionWithContext,

‎packages/expect/src/types.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export type Expect = (<T = unknown>(
106106
AsymmetricMatchers&
107107
Inverse<Omit<AsymmetricMatchers,'any'|'anything'>>;
108108

109-
typeInverse<Matchers>={
109+
exporttypeInverse<Matchers>={
110110
/**
111111
* Inverse next matcher. If you know how to test something, `.not` lets you test its opposite.
112112
*/

‎packages/jest-expect/src/types.ts‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
importtype{AsymmetricMatchers,BaseExpect,Matchers}from'expect';
8+
importtype{AsymmetricMatchers,BaseExpect,Inverse,Matchers}from'expect';
99
importtype{
1010
SnapshotMatchers,
1111
SnapshotState,
@@ -24,13 +24,6 @@ export type JestExpect = {
2424
AsymmetricMatchers&
2525
Inverse<Omit<AsymmetricMatchers,'any'|'anything'>>;
2626

27-
typeInverse<Matchers>={
28-
/**
29-
* Inverse next matcher. If you know how to test something, `.not` lets you test its opposite.
30-
*/
31-
not:Matchers;
32-
};
33-
3427
typeJestMatchers<Rextendsvoid|Promise<void>,T>=Matchers<R,T>&
3528
SnapshotMatchers<R,T>;
3629

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp