diff --git a/react/react.d.ts b/react/react.d.ts index 54d13d5eb2..8d5b621e01 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -336,7 +336,7 @@ declare namespace __React { ref?: string | ((component: T) => any); } - interface DOMAttributes extends Props> { + interface DOMAttributesBase extends Props { onCopy?: ClipboardEventHandler; onCut?: ClipboardEventHandler; onPaste?: ClipboardEventHandler; @@ -377,6 +377,9 @@ declare namespace __React { }; } + interface DOMAttributes extends DOMAttributesBase> { + } + // This interface is not complete. Only properties accepting // unitless numbers are listed here (see CSSProperty.js in React) interface CSSProperties { @@ -406,9 +409,7 @@ declare namespace __React { [propertyName: string]: any; } - interface HTMLAttributes extends DOMAttributes { - ref?: string | ((component: HTMLComponent) => void); - + interface HTMLAttributesBase extends DOMAttributesBase { accept?: string; acceptCharset?: string; accessKey?: string; @@ -528,6 +529,9 @@ declare namespace __React { unselectable?: boolean; } + interface HTMLAttributes extends HTMLAttributesBase { + } + interface SVGElementAttributes extends HTMLAttributes { viewBox?: string; preserveAspectRatio?: string; @@ -1133,7 +1137,7 @@ declare module "react/addons" { ref?: string | ((component: T) => any); } - interface DOMAttributes extends Props> { + interface DOMAttributesBase extends Props { onCopy?: ClipboardEventHandler; onCut?: ClipboardEventHandler; onPaste?: ClipboardEventHandler; @@ -1174,6 +1178,9 @@ declare module "react/addons" { }; } + interface DOMAttributes extends DOMAttributesBase> { + } + // This interface is not complete. Only properties accepting // unitless numbers are listed here (see CSSProperty.js in React) interface CSSProperties { @@ -1203,9 +1210,7 @@ declare module "react/addons" { [propertyName: string]: any; } - interface HTMLAttributes extends DOMAttributes { - ref?: string | ((component: HTMLComponent) => void); - + interface HTMLAttributesBase extends DOMAttributesBase { accept?: string; acceptCharset?: string; accessKey?: string; @@ -1325,6 +1330,9 @@ declare module "react/addons" { unselectable?: boolean; } + interface HTMLAttributes extends HTMLAttributesBase { + } + interface SVGElementAttributes extends HTMLAttributes { viewBox?: string; preserveAspectRatio?: string;