mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Adding children
This commit is contained in:
9
react/react.d.ts
vendored
9
react/react.d.ts
vendored
@@ -12,7 +12,7 @@ declare module "react" {
|
||||
export function isValidClass(factory: Factory<any>): boolean;
|
||||
export function isValidComponent(component: Descriptor<any>): boolean;
|
||||
export function initializeTouchEvents(shouldUseTouch: boolean): void;
|
||||
|
||||
|
||||
export interface Descriptor<P> {
|
||||
props: P;
|
||||
}
|
||||
@@ -55,6 +55,13 @@ declare module "react" {
|
||||
replaceProps(nextProps: P, callback?: () => void): void;
|
||||
}
|
||||
|
||||
export var Children: {
|
||||
map(children: any[], fn: (child: any) => any): any[];
|
||||
forEach(children: any[], fn: (child: any) => any): void;
|
||||
count(children: any[]): number;
|
||||
only(children: any[]): any;
|
||||
};
|
||||
|
||||
// Browser Interfaces
|
||||
// Taken from https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts
|
||||
interface AbstractView {
|
||||
|
||||
Reference in New Issue
Block a user