@@ -232,7 +232,7 @@ Create a production element (TypeScript type).
232232* ` type ` ( ` unknown ` )
233233 — element type: ` Fragment ` symbol, tag name ( ` string ` ), component
234234* ` props ` ([ ` Props ` ][props])
235- — element props and also includes ` children `
235+ — element props, ` children ` , and maybe ` node `
236236* ` key ` ( ` string ` or ` undefined ` )
237237 — dynamicly generated key to use
238238
@@ -249,7 +249,7 @@ Create a development element (TypeScript type).
249249* ` type ` ( ` unknown ` )
250250 — element type: ` Fragment ` symbol, tag name ( ` string ` ), component
251251* ` props ` ([ ` Props ` ][props])
252- — element props and also includes ` children `
252+ — element props, ` children ` , and maybe ` node `
253253* ` key ` ( ` string ` or ` undefined ` )
254254 — dynamicly generated key to use
255255* ` isStaticChildren ` ( ` boolean ` )
@@ -270,14 +270,19 @@ Properties and children (TypeScript type).
270270###### Type
271271
272272` ` ` ts
273+ import type {Element } from ' hast'
274+
273275type Props = {
274- children: Array <JSX .Element | string >
275276 [prop : string ]:
277+ | Element // For `node`.
278+ | Array <JSX .Element | string | null | undefined > // For `children`.
279+ | Record <string , string > // For `style`.
276280 | string
277281 | number
278282 | 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
281286}
282287` ` `
283288
0 commit comments