From b4fdbace3dede99a8acbfbfcfb264da2614f98fd Mon Sep 17 00:00:00 2001 From: James Brantly Date: Sat, 29 Aug 2015 09:48:26 -0400 Subject: [PATCH] Fix CSSProperties indexer issue (sort of) --- react/react-addons-tests.ts | 9 +++++---- react/react.d.ts | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/react/react-addons-tests.ts b/react/react-addons-tests.ts index f4f6db8e7e..15a31cbe93 100644 --- a/react/react-addons-tests.ts +++ b/react/react-addons-tests.ts @@ -206,15 +206,16 @@ myComponent.reset(); // -------------------------------------------------------------------------- var children: any[] = ["Hello world", [null], React.DOM.span(null)]; +var divStyle: React.CSSProperties = { // CSSProperties + flex: "1 1 main-size", + backgroundImage: "url('hello.png')" +}; var htmlAttr: React.HTMLAttributes = { key: 36, ref: "htmlComponent", children: children, className: "test-attr", - style: { // CSSProperties - flex: "1 1 main-size", - backgroundImage: "url('hello.png')" - }, + style: divStyle, onClick: (event: React.MouseEvent) => { event.preventDefault(); event.stopPropagation(); diff --git a/react/react.d.ts b/react/react.d.ts index 98d19688be..906bc9da15 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -403,7 +403,7 @@ declare namespace __React { strokeOpacity?: number; strokeWidth?: number; - [propertyName: string]: string | number | boolean; + [propertyName: string]: any; } interface HTMLAttributes extends DOMAttributes { @@ -1200,7 +1200,7 @@ declare module "react/addons" { strokeOpacity?: number; strokeWidth?: number; - [propertyName: string]: string | number | boolean; + [propertyName: string]: any; } interface HTMLAttributes extends DOMAttributes {