From f062895b5dfca024db600724ffa09640b7b821b7 Mon Sep 17 00:00:00 2001 From: Alexander Fedyashov Date: Wed, 16 Aug 2017 11:24:40 +0300 Subject: [PATCH 1/2] fix(Input): add `focus` method to typings --- src/elements/Input/Input.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/elements/Input/Input.d.ts b/src/elements/Input/Input.d.ts index 28fbe2ab5e..b4dbe9bebc 100644 --- a/src/elements/Input/Input.d.ts +++ b/src/elements/Input/Input.d.ts @@ -83,6 +83,8 @@ export interface InputOnChangeData extends InputProps { value: string; } -declare const Input: React.ComponentClass; +declare class Input extends React.Component { + focus: () => void; +} export default Input; From 0d90f0b02b8126e22b6086feb24b545039e927f8 Mon Sep 17 00:00:00 2001 From: Alexander Fedyashov Date: Wed, 16 Aug 2017 18:28:47 +0300 Subject: [PATCH 2/2] fix(Button|TextArea): add `focus` method to typings --- src/addons/TextArea/TextArea.d.ts | 4 +++- src/elements/Button/Button.d.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/addons/TextArea/TextArea.d.ts b/src/addons/TextArea/TextArea.d.ts index 2bd741af70..67e23e6ba1 100644 --- a/src/addons/TextArea/TextArea.d.ts +++ b/src/addons/TextArea/TextArea.d.ts @@ -31,6 +31,8 @@ export interface TextAreaOnChangeData extends TextAreaProps { value?: string; } -declare const TextArea: React.ComponentClass; +declare class TextArea extends React.Component { + focus: () => void; +} export default TextArea; diff --git a/src/elements/Button/Button.d.ts b/src/elements/Button/Button.d.ts index 2428006005..71d028e175 100644 --- a/src/elements/Button/Button.d.ts +++ b/src/elements/Button/Button.d.ts @@ -101,12 +101,12 @@ export interface ButtonProps { toggle?: boolean; } -interface ButtonComponent extends React.ComponentClass { - Content: typeof ButtonContent; - Group: typeof ButtonGroup; - Or: typeof ButtonOr; -} +declare class Button extends React.Component { + static Content: typeof ButtonContent; + static Group: typeof ButtonGroup; + static Or: typeof ButtonOr; -declare const Button: ButtonComponent; + focus: () => void; +} export default Button;