Children: { count(children): number; forEach<C>(children,
fn): void; map<T, C>(children,
fn): C extends null ? C<C> : Exclude<T, boolean>[]; only<C>(children): C extends any[] ? never : C; toArray(children): (string | number | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal)[]; } Type declaration
count:function
- count(children): number
Returns number
forEach:function
- forEach<C>(children, fn): void
Parameters
- children: C | readonly C[]
- fn: ((child, index) => void)
- (child, index): void
Returns void
Returns void
map:function
- map<T, C>(children, fn): C extends null
? C<C>
: Exclude<T, boolean>[] Parameters
- children: C | readonly C[]
- fn: ((child, index) => T)
- (child, index): T
Returns T
Returns C extends null
? C<C>
: Exclude<T, boolean>[]
only:function
- only<C>(children): C extends any[]
? never
: C Returns C extends any[]
? never
: C
toArray:function
Maintainer's note: Sync with ReactChildren until ReactChildren is removed.