-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.d.ts
86 lines (74 loc) · 1.96 KB
/
types.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
86
/* eslint-disable import/no-unresolved */
/**
* An MDX file which exports a JSX component.
*/
declare module '*.mdx' {
import { JSX, ParentProps } from 'solid-js';
type MDXComponents = {
[key in string]: key extends keyof JSX.IntrinsicElements
? ((properties: JSX.IntrinsicElements[key]) => JSX.Element) | keyof JSX.IntrinsicElements
: (properties: ParentProps) => JSX.Element;
};
type CustomComponents = Record<string, (properties: ParentProps) => JSX.Element>;
interface MDXProperties {
components?: Partial<MDXComponents>;
children?: JSX.Element;
[key: string]: unknown;
}
/**
* An function component which renders the MDX content using JSX.
*
* @param props This value is be available as the named variable `props` inside the MDX component.
* @returns A JSX element. The meaning of this may depend on the project configuration. I.e. it
* could be a React, Preact, or Vuex element.
*/
export default function Component(properties: MDXProperties): JSX.Element;
}
/**
* A markdown file which exports a JSX component.
*/
declare module '*.md' {
export { default } from '*.mdx';
}
/**
* A markdown file which exports a JSX component.
*/
declare module '*.markdown' {
export { default } from '*.mdx';
}
/**
* A markdown file which exports a JSX component.
*/
declare module '*.mdown' {
export { default } from '*.mdx';
}
/**
* A markdown file which exports a JSX component.
*/
declare module '*.mkdn' {
export { default } from '*.mdx';
}
/**
* A markdown file which exports a JSX component.
*/
declare module '*.mkd' {
export { default } from '*.mdx';
}
/**
* A markdown file which exports a JSX component.
*/
declare module '*.mdwn' {
export { default } from '*.mdx';
}
/**
* A markdown file which exports a JSX component.
*/
declare module '*.mkdown' {
export { default } from '*.mdx';
}
/**
* A markdown file which exports a JSX component.
*/
declare module '*.ron' {
export { default } from '*.mdx';
}