mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Write typings for React.Children.toArray and React.Children.map
This commit is contained in:
Vendored
+2
-1
@@ -747,10 +747,11 @@ declare namespace __React {
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
interface ReactChildren {
|
||||
map<T>(children: ReactNode, fn: (child: ReactChild, index: number) => T): { [key:string]: T };
|
||||
map<T>(children: ReactNode, fn: (child: ReactChild, index: number) => T): T[];
|
||||
forEach(children: ReactNode, fn: (child: ReactChild, index: number) => any): void;
|
||||
count(children: ReactNode): number;
|
||||
only(children: ReactNode): ReactChild;
|
||||
toArray(children: ReactNode): ReactChild[];
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user