Change React.React.Attributes.key type to any // number | string

This commit is contained in:
Vincent Siao
2014-12-12 16:10:24 -08:00
parent dbb10b35c6
commit 660d263565
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -18,6 +18,8 @@ interface MyComponent extends React.CompositeComponent<Props, State> {
}
var props: Props = {
key: 42,
ref: "myComponent42",
hello: "world",
foo: 42,
bar: true
@@ -124,7 +126,9 @@ var divStyle = { // CSSProperties
flex: "1 1 main-size",
backgroundImage: "url('hello.png')"
};
var htmlAttr = {
var htmlAttr: React.HTMLAttributes = {
key: 36,
ref: "htmlComponent",
children: children,
className: "test-attr",
style: divStyle,
+1 -1
View File
@@ -242,7 +242,7 @@ declare module React {
export interface ReactAttributes {
children?: any; // ReactNode
key?: string;
key?: any; // number | string
ref?: string;
// Event Attributes