-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJSX.d.ts
More file actions
30 lines (24 loc) · 1.08 KB
/
JSX.d.ts
File metadata and controls
30 lines (24 loc) · 1.08 KB
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
/** JSX element definitions so we can have noImplictAny and TSX files. */
declare namespace JSX {
interface IntrinsicElements {
[elemName: string]: any;
}
/** Properties and children to apply to an element. */
interface ElementProperties {
/* Optional key to merge future changes by, should be unique within the parent DOM node. */
key?: string;
/** Properties have a string name and can have any value. */
[name: string]: any;
/** Children can be text, another element, or a mixed collection of either. */
children?: string | number | Element | (string | number | Element)[]
}
/** Represent a virtual element in the DOM. */
interface Element {
/** The tag name of an element or a class function to create one. */
type: string | { new(): HTMLElement | SVGElement };
/** Optional properties and children to apply to the element. */
props?: ElementProperties;
/** Render this element. */
render?: (root?: Node | null) => Node;
}
}