mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Change React.React.Attributes.key type to any // number | string
This commit is contained in:
@@ -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,
|
||||
|
||||
Vendored
+1
-1
@@ -242,7 +242,7 @@ declare module React {
|
||||
|
||||
export interface ReactAttributes {
|
||||
children?: any; // ReactNode
|
||||
key?: string;
|
||||
key?: any; // number | string
|
||||
ref?: string;
|
||||
|
||||
// Event Attributes
|
||||
|
||||
Reference in New Issue
Block a user