Skip to content

Commit 49d59d8

Browse files
author
Tobias Lengsholz
authored
Extend global namespace with jest matcher (#308)
1 parent e3bc35e commit 49d59d8

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

typings/index.d.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
import { Plugin, NewPlugin } from 'pretty-format'
22

3-
declare namespace jest {
4-
interface AsymmetricMatcher {
5-
$$typeof: Symbol;
6-
sample?: string | RegExp | object | Array<any> | Function;
7-
}
3+
declare global {
4+
namespace jest {
5+
interface AsymmetricMatcher {
6+
$$typeof: Symbol;
7+
sample?: string | RegExp | object | Array<any> | Function;
8+
}
89

9-
type Value = string | number | RegExp | AsymmetricMatcher | undefined;
10+
type Value = string | number | RegExp | AsymmetricMatcher | undefined;
1011

11-
interface Options {
12-
media?: string;
13-
modifier?: string;
14-
supports?: string;
15-
}
12+
interface Options {
13+
media?: string;
14+
modifier?: string;
15+
supports?: string;
16+
}
1617

17-
interface Matchers<R, T> {
18-
toHaveStyleRule(property: string, value?: Value, options?: Options): R;
18+
interface Matchers<R, T> {
19+
toHaveStyleRule(property: string, value?: Value, options?: Options): R;
20+
}
1921
}
2022
}
2123

0 commit comments

Comments
 (0)