mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
reactChidlren callbacks accept index
ref https://github.com/facebook/react/blob/10c816604336d4b3ec4c2a4e0ac42061a37dd8ee/src/isomorphic/children/ReactChildren.js#L52
This commit is contained in:
1 parent
af81415504
commit
55465434fd
3 files changed
+6
-6
No files matched your search
Vendored
+2
-2
@@ -748,8 +748,8 @@ declare module "react/addons" {
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
interface ReactChildren {
|
||||
map<T>(children: ReactNode, fn: (child: ReactChild) => T): { [key:string]: T };
|
||||
forEach(children: ReactNode, fn: (child: ReactChild) => any): void;
|
||||
map<T>(children: ReactNode, fn: (child: ReactChild, index: number) => T): { [key:string]: T };
|
||||
forEach(children: ReactNode, fn: (child: ReactChild, index: number) => any): void;
|
||||
count(children: ReactNode): number;
|
||||
only(children: ReactNode): ReactChild;
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -755,8 +755,8 @@ declare module React {
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
interface ReactChildren {
|
||||
map<T>(children: ReactNode, fn: (child: ReactChild) => T): { [key:string]: T };
|
||||
forEach(children: ReactNode, fn: (child: ReactChild) => any): void;
|
||||
map<T>(children: ReactNode, fn: (child: ReactChild, index: number) => T): { [key:string]: T };
|
||||
forEach(children: ReactNode, fn: (child: ReactChild, index: number) => any): void;
|
||||
count(children: ReactNode): number;
|
||||
only(children: ReactNode): ReactChild;
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -755,8 +755,8 @@ declare module __React {
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
interface ReactChildren {
|
||||
map<T>(children: ReactNode, fn: (child: ReactChild) => T): { [key:string]: T };
|
||||
forEach(children: ReactNode, fn: (child: ReactChild) => any): void;
|
||||
map<T>(children: ReactNode, fn: (child: ReactChild, index: number) => T): { [key:string]: T };
|
||||
forEach(children: ReactNode, fn: (child: ReactChild, index: number) => any): void;
|
||||
count(children: ReactNode): number;
|
||||
only(children: ReactNode): ReactChild;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user