Методы
count
count(children: any): number
forEach
forEach<C>(children: C | C[], fn: (child: C, index: number) => void): void Параметры
- children: C | C[]
- fn: (child: C, index: number) => void
Возвращает void
map
map<T, C>( children: C | C[], fn: (child: C, index: number) => T,): C extends null| undefined ? C<C> : Exclude<T, boolean | null | undefined>[] Параметры
- children: C | C[]
- fn: (child: C, index: number) => T
Возвращает C extends null | undefined ? C<C> : Exclude<T, boolean | null | undefined>[]
only
only<C>(children: C): C extends any[] ? never : C Возвращает C extends any[] ? never : C