{ - type: any; // ReactType + type: ComponentClass
| string;
props: P;
- key: any; // number | string
+ key: number | string;
ref: string;
}
@@ -22,14 +22,15 @@ declare module React {
//
// React Nodes
+ // http://facebook.github.io/react/docs/glossary.html
// ----------------------------------------------------------------------
- // type ReactText = string | number;
- // type Fragment = ReactNode[];
- // type ReactNode = ReactElement {
- (props?: P, ...children: any/*ReactNode*/[]): ReactElement ;
+ (props?: P, ...children: ReactNode[]): ReactElement ;
}
interface HTMLFactory extends ComponentFactory (spec: ComponentSpec ): ComponentClassType ;
- createElement (type: any/*ReactType*/, props: P, ...children: any/*ReactNode*/[]): ReactElement ;
+ createElement (type: ComponentClass | string, props: P, ...children: ReactNode[]): ReactElement ;
createFactory (componentClass: ComponentClassType ): ComponentFactory ;
render (element: ReactElement , container: Element, callback?: () => any): Component ;
unmountComponentAtNode(container: Element): boolean;
@@ -245,8 +246,8 @@ declare module React {
// ----------------------------------------------------------------------
export interface ReactAttributes {
- children?: any; // ReactNode
- key?: any; // number | string
+ children?: ReactNode;
+ key?: number | string;
ref?: string;
// Event Attributes
@@ -286,13 +287,13 @@ declare module React {
onWheel?: WheelEventHandler;
dangerouslySetInnerHTML?: {
- __html: string
+ __html: string;
};
}
interface CSSProperties {
columnCount?: number;
- flex?: any; // number | string
+ flex?: number | string;
flexGrow?: number;
flexShrink?: number;
fontWeight?: number;
@@ -322,8 +323,8 @@ declare module React {
autoComplete?: boolean;
autoFocus?: boolean;
autoPlay?: boolean;
- cellPadding?: any; // number | string
- cellSpacing?: any; // number | string
+ cellPadding?: number | string;
+ cellSpacing?: number | string;
charSet?: string;
checked?: boolean;
classID?: string;
@@ -346,8 +347,8 @@ declare module React {
encType?: string;
form?: string;
formNoValidate?: boolean;
- frameBorder?: any; // number | string
- height?: any; // number | string
+ frameBorder?: number | string;
+ height?: number | string;
hidden?: boolean;
href?: string;
hrefLang?: string;
@@ -360,12 +361,12 @@ declare module React {
list?: string;
loop?: boolean;
manifest?: string;
- max?: any; // number | string
+ max?: number | string;
maxLength?: number;
media?: string;
mediaGroup?: string;
method?: string;
- min?: any; // number | string
+ min?: number | string;
multiple?: boolean;
muted?: boolean;
name?: string;
@@ -398,7 +399,7 @@ declare module React {
srcDoc?: string;
srcSet?: string;
start?: number;
- step?: any; // number | string
+ step?: number | string;
style?: CSSProperties;
tabIndex?: number;
target?: string;
@@ -406,7 +407,7 @@ declare module React {
type?: string;
useMap?: string;
value?: string;
- width?: any; // number | string
+ width?: number | string;
wmode?: string;
// Non-standard Attributes
@@ -419,49 +420,49 @@ declare module React {
}
interface SVGAttributes extends ReactAttributes {
- cx?: any; // SVGLength | SVGAnimatedLength
+ cx?: SVGLength | SVGAnimatedLength;
cy?: any;
d?: string;
- dx?: any; // SVGLength | SVGAnimatedLength
- dy?: any; // SVGLength | SVGAnimatedLength
+ dx?: SVGLength | SVGAnimatedLength;
+ dy?: SVGLength | SVGAnimatedLength;
fill?: any; // SVGPaint | string
- fillOpacity?: any; // number | string
+ fillOpacity?: number | string;
fontFamily?: string;
- fontSize?: any; // number | string
- fx?: any; // SVGLength | SVGAnimatedLength
- fy?: any; // SVGLength | SVGAnimatedLength
- gradientTransform?: any; // SVGTransformList | SVGAnimatedTransformList
+ fontSize?: number | string;
+ fx?: SVGLength | SVGAnimatedLength;
+ fy?: SVGLength | SVGAnimatedLength;
+ gradientTransform?: SVGTransformList | SVGAnimatedTransformList;
gradientUnits?: string;
markerEnd?: string;
markerMid?: string;
markerStart?: string;
- offset?: any; // number | string
- opacity?: any; // number | string
+ offset?: number | string;
+ opacity?: number | string;
patternContentUnits?: string;
patternUnits?: string;
points?: string;
preserveAspectRatio?: string;
- r?: any; // SVGLength | SVGAnimatedLength
- rx?: any; // SVGLength | SVGAnimatedLength
- ry?: any; // SVGLength | SVGAnimatedLength
+ r?: SVGLength | SVGAnimatedLength;
+ rx?: SVGLength | SVGAnimatedLength;
+ ry?: SVGLength | SVGAnimatedLength;
spreadMethod?: string;
stopColor?: any; // SVGColor | string
- stopOpacity?: any; // number | string
+ stopOpacity?: number | string;
stroke?: any; // SVGPaint
strokeDasharray?: string;
strokeLinecap?: string;
- strokeOpacity?: any; // number | string
- strokeWidth?: any; // SVGLength | SVGAnimatedLength
+ strokeOpacity?: number | string;
+ strokeWidth?: SVGLength | SVGAnimatedLength;
textAnchor?: string;
- transform?: any; // SVGTransformList | SVGAnimatedTransformList
+ transform?: SVGTransformList | SVGAnimatedTransformList;
version?: string;
viewBox?: string;
- x1?: any; // SVGLength | SVGAnimatedLength
- x2?: any; // SVGLength | SVGAnimatedLength
- x?: any; // SVGLength | SVGAnimatedLength
- y1?: any; // SVGLength | SVGAnimatedLength
- y2?: any; // SVGLength | SVGAnimatedLength
- y?: any; // SVGLength | SVGAnimatedLength
+ x1?: SVGLength | SVGAnimatedLength;
+ x2?: SVGLength | SVGAnimatedLength;
+ x?: SVGLength | SVGAnimatedLength;
+ y1?: SVGLength | SVGAnimatedLength;
+ y2?: SVGLength | SVGAnimatedLength
+ y?: SVGLength | SVGAnimatedLength;
}
//
@@ -641,13 +642,11 @@ declare module React {
// React.Children
// ----------------------------------------------------------------------
- // type Child = ReactElement