From 596ab8e1eefd8b9979544373514525cf2e9940e3 Mon Sep 17 00:00:00 2001 From: Phips Peter Date: Fri, 3 Oct 2014 10:25:49 -0700 Subject: [PATCH 1/2] Fixing renderComponent It should return a descriptor, not be void. --- react/react.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/react.d.ts b/react/react.d.ts index 507a18f399..b6c0f49895 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -10,7 +10,7 @@ declare module "react" { declare module React { export function createClass(specification: Specification): Factory

; - export function renderComponent(component: Descriptor, container: Element, callback?: () => void): void; + export function renderComponent

(component: Descriptor

, container: Element, callback?: () => void): Descriptor

; export function unmountComponentAtNode(container: Element): boolean; From 0259c7fba128ea158eb814068b54a79d35916160 Mon Sep 17 00:00:00 2001 From: Phips Peter Date: Fri, 3 Oct 2014 11:49:52 -0700 Subject: [PATCH 2/2] Adding ReactAttributes These were missing before --- react/react.d.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/react/react.d.ts b/react/react.d.ts index b6c0f49895..0b0350473d 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -255,7 +255,16 @@ declare module React { onWheel?: (event: WheelEvent) => void; } - export interface DomAttributes extends EventAttributes { + export interface ReactAttributes { + dangerouslySetInnerHTML?: { + __html: string; + }; + children?: any[]; + key?: string; + ref?: string; + } + + export interface DomAttributes extends EventAttributes, ReactAttributes { // HTML Attributes accept?: any; accessKey?: any; @@ -264,7 +273,9 @@ declare module React { allowTransparency?: any; alt?: any; async?: any; + autoCapitalize?: any; autoComplete?: any; + autoCorrect?: any; autoFocus?: any; autoPlay?: any; cellPadding?: any; @@ -299,6 +310,9 @@ declare module React { httpEquiv?: any; icon?: any; id?: any; + itemProp?: any; + itemScope?: any; + itemType?: any; label?: any; lang?: any; list?: any; @@ -317,6 +331,7 @@ declare module React { placeholder?: any; poster?: any; preload?: any; + property?: any; radioGroup?: any; readOnly?: any; rel?: any; @@ -351,7 +366,7 @@ declare module React { wmode?: any; } - export interface SvgAttributes extends EventAttributes { + export interface SvgAttributes extends EventAttributes, ReactAttributes { cx?: any; cy?: any; d?: any;