From 443f5a9e398afa83a5a188cd6b5de57c8e5daafc Mon Sep 17 00:00:00 2001 From: glatzert Date: Wed, 24 Feb 2016 16:51:17 +0100 Subject: [PATCH 1/3] Updated interface HTMLAttributes Added [key:string]: any; to HTMLAttributes to Support data- and aria- Attributes, which are unsupported currently. --- react/react.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/react/react.d.ts b/react/react.d.ts index 5753731b18..cadae5cb0d 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -1843,6 +1843,9 @@ declare namespace __React { results?: number; security?: string; unselectable?: boolean; + + // Allows aria- and data- Attributes + [key: string]: any; } interface SVGAttributes extends HTMLAttributes { From e72758e8b73e8a33d54e7b405df8d32989c6a90d Mon Sep 17 00:00:00 2001 From: glatzert Date: Thu, 25 Feb 2016 09:43:59 +0100 Subject: [PATCH 2/3] Updated HTMLAttributes to support data- and aria- more spceifically The HTMLAttribute was updated to Support data-* and aria-* Attributes. Since `any` is possibly to broad, the Definition allows any type used in HTMLAttributes and DOMAttributes. --- 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 cadae5cb0d..c51085fb92 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -1845,7 +1845,7 @@ declare namespace __React { unselectable?: boolean; // Allows aria- and data- Attributes - [key: string]: any; + [key: string]: string | string[] | boolean | number | EventHandler | CSSProperties | {__html: string}; } interface SVGAttributes extends HTMLAttributes { From 744a89c4b12aa6537bcc39e7581d291dc74a4c3a Mon Sep 17 00:00:00 2001 From: glatzert Date: Thu, 25 Feb 2016 10:28:51 +0100 Subject: [PATCH 3/3] Updated interface HTMLAttributes The explicit form of the indexer `[key: string]: string | string[] | boolean | number | EventHandler | CSSProperties | {__html: string};` Fails in TravisCI - so any is currently the way to go. --- 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 c51085fb92..cadae5cb0d 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -1845,7 +1845,7 @@ declare namespace __React { unselectable?: boolean; // Allows aria- and data- Attributes - [key: string]: string | string[] | boolean | number | EventHandler | CSSProperties | {__html: string}; + [key: string]: any; } interface SVGAttributes extends HTMLAttributes {