Skip to content

Commit

Permalink
Avoid clashes with other globals in type declaration (#9415)
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode authored and SimenB committed Jan 16, 2020
1 parent 5e5db14 commit 72040d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/jest-types/src/Global.ts
Expand Up @@ -67,7 +67,7 @@ export interface Describe extends DescribeBase {
}

// TODO: Maybe add `| Window` in the future?
export interface Global extends NodeJS.Global {
export interface GlobalAdditions {
it: ItConcurrent;
test: ItConcurrent;
fit: ItBase & {concurrent?: ItConcurrentBase};
Expand All @@ -82,5 +82,9 @@ export interface Global extends NodeJS.Global {
pending: () => void;
spyOn: () => void;
spyOnProperty: () => void;
}
export interface Global
extends GlobalAdditions,
Omit<NodeJS.Global, keyof GlobalAdditions> {
[extras: string]: any;
}

0 comments on commit 72040d9

Please sign in to comment.