forked from GitbookIO/integrations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsx-runtime.d.ts
72 lines (66 loc) · 2.17 KB
/
jsx-runtime.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
import {
ContentKitBox,
ContentKitButton,
ContentKitCard,
ContentKitCodeBlock,
ContentKitDivider,
ContentKitHStack,
ContentKitMarkdown,
ContentKitVStack,
ContentKitWebFrame,
ContentKitTextInput,
ContentKitText,
ContentKitBlock,
ContentKitImage,
ContentKitSelect,
ContentKitSwitch,
ContentKitRadio,
ContentKitCheckbox,
ContentKitModal,
ContentKitInput,
ContentKitHint,
ContentKitLink,
} from '@gitbook/api';
// eslint-disable-next-line import/no-internal-modules
import { jsx, jsxDEV, jsxs, Fragment } from './src/contentkit-jsx';
/**
* This is a workaround for Typescript not supporting subpath exports in package.json
* https://github.com/microsoft/TypeScript/issues/33079
*/
declare module '@gitbook/runtime/jsx-runtime' {
export type jsx = typeof jsx;
export type jsxs = typeof jsxs;
export type jsxDEV = typeof jsxDEV;
export type Fragment = typeof Fragment;
}
type OmitType<T> = Omit<T, 'type'>;
declare global {
namespace JSX {
interface ElementChildrenAttribute {
children: {}; // specify children name to use
}
interface IntrinsicElements {
block: OmitType<ContentKitBlock>;
button: OmitType<ContentKitButton>;
box: OmitType<ContentKitBox>;
vstack: OmitType<ContentKitVStack>;
hstack: OmitType<ContentKitHStack>;
divider: OmitType<ContentKitDivider>;
text: OmitType<ContentKitText>;
hint: OmitType<ContentKitHint>;
link: OmitType<ContentKitLink>;
codeblock: OmitType<ContentKitCodeBlock>;
markdown: OmitType<ContentKitMarkdown>;
webframe: OmitType<ContentKitWebFrame>;
input: OmitType<ContentKitInput>;
textinput: OmitType<ContentKitTextInput>;
card: OmitType<ContentKitCard>;
image: OmitType<ContentKitImage>;
select: OmitType<ContentKitSelect>;
switch: OmitType<ContentKitSwitch>;
radio: OmitType<ContentKitRadio>;
modal: OmitType<ContentKitModal>;
checkbox: OmitType<ContentKitCheckbox>;
}
}
}