UNPKG

856 BTypeScriptView Raw
1import { NewPlugin } from 'pretty-format'
2import { css } from 'styled-components'
3
4declare global {
5 namespace jest {
6 interface AsymmetricMatcher {
7 $$typeof: Symbol;
8 sample?: string | RegExp | object | Array<any> | Function;
9 }
10
11 type Value = string | number | RegExp | AsymmetricMatcher | undefined;
12
13 interface Options {
14 media?: string;
15 modifier?: string | ReturnType<typeof css>;
16 supports?: string;
17 }
18
19 interface Matchers<R, T> {
20 toHaveStyleRule(property: string, value?: Value, options?: Options): R;
21 }
22 }
23}
24
25export interface StyledComponentsSerializerOptions {
26 addStyles?: boolean,
27 classNameFormatter?: (index: number) => string
28}
29
30export declare const styleSheetSerializer: NewPlugin & {
31 setStyleSheetSerializerOptions: (options?: StyledComponentsSerializerOptions) => void
32};