-
Notifications
You must be signed in to change notification settings - Fork 1
/
jsx-dev-runtime.tsx
46 lines (37 loc) · 1004 Bytes
/
jsx-dev-runtime.tsx
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
import { Construct } from "constructs";
export function jsxDEV(type: any, props: any, key: string): JSX.Element {
return { type, key, props };
}
declare namespace ReactCDK {
type Key = string;
type JSXElementConstructor<P> =
| ((props: P) => ReactElement<any, any>)
| Construct;
interface ReactElement<
P = any,
T extends string | JSXElementConstructor<any> =
| string
| JSXElementConstructor<any>
> {
type: T;
props: P;
key: Key | null;
}
interface RefObject<T> {
readonly current: T | null;
}
type Ref<T> = RefObject<T> | null;
interface Attributes {
key?: Key | null | undefined;
}
interface ClassAttributes<T> extends Attributes {
ref?: Ref<T> | undefined;
}
}
declare global {
namespace JSX {
interface Element extends ReactCDK.ReactElement<any, any> {}
interface IntrinsicAttributes extends ReactCDK.Attributes {}
interface IntrinsicClassAttributes<T> extends ReactCDK.ClassAttributes<T> {}
}
}