-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobals.d.ts
85 lines (75 loc) · 1.72 KB
/
globals.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import * as React from "react";
declare module "*.md" {
const content: string;
export default content;
}
declare module "*.mdx" {
let MDXComponent: (props: any) => JSX.Element;
export default MDXComponent;
}
declare global {
namespace jest {
interface Matchers<R> {
toMatchImageSnapshot: (options?: MatchImageSnapshotOptions) => R
}
}
}
interface Match<G extends { [key: string]: string } | any> {
// Note that G is only undefined when the RegExp has no named capture groups
groups: G
}
interface RegExp {
exec<G extends { [key: string]: string } | undefined>(
s: string
): null | Match<Partial<G>>
}
declare module "*.svg" {
export const ReactComponent: React.FunctionComponent<React.SVGProps<
SVGSVGElement
> & { title?: string }>;
const src: string;
export default src;
}
// __DISABLE_TRANSITIONS__ variable is injected by Webpack to turn off animations during tests
declare var __DISABLE_TRANSITIONS__: boolean;
// 'react-scroll-sync' doesnt have types
declare module 'react-scroll-sync' {
export const ScrollSync: React.FC;
export const ScrollSyncPane: React.FC;
}
declare module '@mdx-js/react' {
type ComponentType =
| 'a'
| 'blockquote'
| 'code'
| 'del'
| 'em'
| 'h1'
| 'h2'
| 'h3'
| 'h4'
| 'h5'
| 'h6'
| 'hr'
| 'img'
| 'inlineCode'
| 'li'
| 'ol'
| 'p'
| 'pre'
| 'strong'
| 'sup'
| 'table'
| 'td'
| 'thematicBreak'
| 'tr'
| 'ul'
export type Components = {
[key in ComponentType]?: React.ComponentType<any>
}
export interface MDXProviderProps {
children: React.ReactNode
components: Components
}
export class MDXProvider extends React.Component<MDXProviderProps> {}
}