Skip to content

Commit 72040d9

Browse files
cspotcodeSimenB
authored andcommittedJan 16, 2020
Avoid clashes with other globals in type declaration (#9415)
1 parent 5e5db14 commit 72040d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export interface Describe extends DescribeBase {
6767
}
6868

6969
// TODO: Maybe add `| Window` in the future?
70-
export interface Global extends NodeJS.Global {
70+
export interface GlobalAdditions {
7171
it: ItConcurrent;
7272
test: ItConcurrent;
7373
fit: ItBase & {concurrent?: ItConcurrentBase};
@@ -82,5 +82,9 @@ export interface Global extends NodeJS.Global {
8282
pending: () => void;
8383
spyOn: () => void;
8484
spyOnProperty: () => void;
85+
}
86+
export interface Global
87+
extends GlobalAdditions,
88+
Omit<NodeJS.Global, keyof GlobalAdditions> {
8589
[extras: string]: any;
8690
}

0 commit comments

Comments
 (0)
Please sign in to comment.