Skip to content

Commit c204aa7

Browse files
committed
Add JSX types used by string builder impl.
1 parent a832ae5 commit c204aa7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

site/public/guides/enabling-jsx.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,22 @@ declare namespace JSX {
115115
}
116116
```
117117

118+
If you're using `immaculata/jsx-strings.js` then you should use this:
119+
120+
```ts
121+
declare namespace JSX {
122+
123+
type ElementChildrenAttribute = { children: string | false | null | undefined | ElementChildrenAttribute['children'][] }
124+
125+
type Element = string
126+
127+
type ElementType =
128+
| string
129+
| ((data: any) => ElementChildrenAttribute['children'])
130+
131+
}
132+
```
133+
118134
For HTML tag autocompletion and good-enough attr validation:
119135

120136
```ts

0 commit comments

Comments
 (0)