@@ -232,7 +232,7 @@ Create a production element (TypeScript type).
232
232
* ` type ` ( ` unknown ` )
233
233
— element type: ` Fragment ` symbol, tag name ( ` string ` ), component
234
234
* ` props ` ([ ` Props ` ][props])
235
- — element props and also includes ` children `
235
+ — element props, ` children ` , and maybe ` node `
236
236
* ` key ` ( ` string ` or ` undefined ` )
237
237
— dynamicly generated key to use
238
238
@@ -249,7 +249,7 @@ Create a development element (TypeScript type).
249
249
* ` type ` ( ` unknown ` )
250
250
— element type: ` Fragment ` symbol, tag name ( ` string ` ), component
251
251
* ` props ` ([ ` Props ` ][props])
252
- — element props and also includes ` children `
252
+ — element props, ` children ` , and maybe ` node `
253
253
* ` key ` ( ` string ` or ` undefined ` )
254
254
— dynamicly generated key to use
255
255
* ` isStaticChildren ` ( ` boolean ` )
@@ -270,14 +270,19 @@ Properties and children (TypeScript type).
270
270
###### Type
271
271
272
272
` ` ` ts
273
+ import type {Element } from ' hast'
274
+
273
275
type Props = {
274
- children: Array <JSX .Element | string >
275
276
[prop : string ]:
277
+ | Element // For `node`.
278
+ | Array <JSX .Element | string | null | undefined > // For `children`.
279
+ | Record <string , string > // For `style`.
276
280
| string
277
281
| number
278
282
| boolean
279
- | Record <string , string > // For `style`.
280
- | Array <JSX .Element | string > // For `children`.
283
+ | undefined
284
+ children: Array <JSX .Element | string | null | undefined >
285
+ node? : Element | undefined
281
286
}
282
287
` ` `
283
288
0 commit comments