Skip to content

Commit

Permalink
Extend global namespace with jest matcher (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Lengsholz committed Mar 17, 2020
1 parent e3bc35e commit 49d59d8
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions typings/index.d.ts
@@ -1,21 +1,23 @@
import { Plugin, NewPlugin } from 'pretty-format'

declare namespace jest {
interface AsymmetricMatcher {
$$typeof: Symbol;
sample?: string | RegExp | object | Array<any> | Function;
}
declare global {
namespace jest {
interface AsymmetricMatcher {
$$typeof: Symbol;
sample?: string | RegExp | object | Array<any> | Function;
}

type Value = string | number | RegExp | AsymmetricMatcher | undefined;
type Value = string | number | RegExp | AsymmetricMatcher | undefined;

interface Options {
media?: string;
modifier?: string;
supports?: string;
}
interface Options {
media?: string;
modifier?: string;
supports?: string;
}

interface Matchers<R, T> {
toHaveStyleRule(property: string, value?: Value, options?: Options): R;
interface Matchers<R, T> {
toHaveStyleRule(property: string, value?: Value, options?: Options): R;
}
}
}

Expand Down

0 comments on commit 49d59d8

Please sign in to comment.