mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Take shared Props (key, ref, children) out of ReactAttributes and rename to DOMAttribtues
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// TODO: import "react" once 0.13.0 is released
|
||||
import React = require("react/addons");
|
||||
|
||||
interface Props {
|
||||
interface Props extends React.Props {
|
||||
hello: string;
|
||||
world?: string;
|
||||
foo: number;
|
||||
|
||||
11
react/react-0.13.0.d.ts
vendored
11
react/react-0.13.0.d.ts
vendored
@@ -308,15 +308,16 @@ declare module "react" {
|
||||
interface WheelEventHandler extends EventHandler<WheelEvent> {}
|
||||
|
||||
//
|
||||
// Attributes
|
||||
// Props / DOM Attributes
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
interface ReactAttributes {
|
||||
interface Props {
|
||||
children?: ReactNode;
|
||||
key?: number | string;
|
||||
ref?: string;
|
||||
}
|
||||
|
||||
// Event Attributes
|
||||
interface DOMAttributes extends Props {
|
||||
onCopy?: ClipboardEventHandler;
|
||||
onCut?: ClipboardEventHandler;
|
||||
onPaste?: ClipboardEventHandler;
|
||||
@@ -377,7 +378,7 @@ declare module "react" {
|
||||
strokeOpacity?: number;
|
||||
}
|
||||
|
||||
interface HTMLAttributes extends ReactAttributes {
|
||||
interface HTMLAttributes extends DOMAttributes {
|
||||
accept?: string;
|
||||
acceptCharset?: string;
|
||||
accessKey?: string;
|
||||
@@ -485,7 +486,7 @@ declare module "react" {
|
||||
itemType?: string;
|
||||
}
|
||||
|
||||
interface SVGAttributes extends ReactAttributes {
|
||||
interface SVGAttributes extends DOMAttributes {
|
||||
cx?: SVGLength | SVGAnimatedLength;
|
||||
cy?: any;
|
||||
d?: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path="react-addons-0.13.0.d.ts" />
|
||||
import React = require("react/addons");
|
||||
|
||||
interface Props {
|
||||
interface Props extends React.Props {
|
||||
hello: string;
|
||||
world?: string;
|
||||
foo: number;
|
||||
|
||||
11
react/react-addons-0.13.0.d.ts
vendored
11
react/react-addons-0.13.0.d.ts
vendored
@@ -308,15 +308,16 @@ declare module "react/addons" {
|
||||
interface WheelEventHandler extends EventHandler<WheelEvent> {}
|
||||
|
||||
//
|
||||
// Attributes
|
||||
// Props / DOM Attributes
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
interface ReactAttributes {
|
||||
interface Props {
|
||||
children?: ReactNode;
|
||||
key?: number | string;
|
||||
ref?: string;
|
||||
}
|
||||
|
||||
// Event Attributes
|
||||
interface DOMAttributes extends Props {
|
||||
onCopy?: ClipboardEventHandler;
|
||||
onCut?: ClipboardEventHandler;
|
||||
onPaste?: ClipboardEventHandler;
|
||||
@@ -377,7 +378,7 @@ declare module "react/addons" {
|
||||
strokeOpacity?: number;
|
||||
}
|
||||
|
||||
interface HTMLAttributes extends ReactAttributes {
|
||||
interface HTMLAttributes extends DOMAttributes {
|
||||
accept?: string;
|
||||
acceptCharset?: string;
|
||||
accessKey?: string;
|
||||
@@ -485,7 +486,7 @@ declare module "react/addons" {
|
||||
itemType?: string;
|
||||
}
|
||||
|
||||
interface SVGAttributes extends ReactAttributes {
|
||||
interface SVGAttributes extends DOMAttributes {
|
||||
cx?: SVGLength | SVGAnimatedLength;
|
||||
cy?: any;
|
||||
d?: string;
|
||||
|
||||
Reference in New Issue
Block a user