# Variable Children`Const`

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)[];
}

Maintainer's note: Sync with ReactChildren until ReactChildren is removed.

#### Type declaration

- ##### count:function

  - count(children): number

  - #### Parameters

    - children: any

    #### Returns number

    - Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:791

- ##### forEach:function

  - forEach<C>(children, fn): void

  - #### Type Parameters

    - C

    #### Parameters

    - children: C | readonly C[]
    - fn: ((child, index) => void)
      - - (child, index): void

        - #### Parameters

          - child: C
          - index: number

          #### Returns void

    - Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:790

- ##### map:function

  - map<T, C>(children, fn): C extends null
    ? C<C>
    : Exclude<T, boolean>[]

  - #### Type Parameters

    - T
    - C

    #### Parameters

    - children: C | readonly C[]
    - fn: ((child, index) => T)
      - - (child, index): T

        - #### Parameters

          - child: C
          - index: number

          #### Returns T

    #### Returns C extends null
    ? C<C>
    : Exclude<T, boolean>[]

    - Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:786

- ##### only:function

  - only<C>(children): C extends any[]
    ? never
    : C

  - #### Type Parameters

    - C

    #### Parameters

    - children: C

    #### Returns C extends any[]
    ? never
    : C

    - Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:792

- ##### toArray:function

  - toArray(children): (string | number | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal)[]

  - #### Parameters

    - children: ReactNode | ReactNode[]

    #### Returns (string | number | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal)[]

    - Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:793

- Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:785