diff --git a/types/react-mentions/index.d.ts b/types/react-mentions/index.d.ts index ff10bbc013..f5892189b1 100644 --- a/types/react-mentions/index.d.ts +++ b/types/react-mentions/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for react-mentions 2.3 +// Type definitions for react-mentions 2.4 // Project: https://github.com/signavio/react-mentions // Definitions by: Scott Willeke +// Eugene Fedorenko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from "react"; @@ -41,21 +42,7 @@ export interface MentionsInputProps { style?: any; regex?: RegExp; suggestionsPortalHost?: Element; -} - -/** - * Exposes the type for use with the @see MentionsInputComponent.wrappedInstance which is added by react-mentions' use of substyle (https://github.com/jfschwarz/substyle). - */ -export interface MentionsInputComponentUnrwapped extends React.Component { - inputRef?: HTMLInputElement | HTMLTextAreaElement; -} - -/** - * Used with @see React.RefObject. - */ -export interface MentionsInputComponent extends React.Component { - // MentionsInput uses substyle (https://github.com/jfschwarz/substyle) which adds this wrappedInstance - wrappedInstance?: MentionsInputComponentUnrwapped; + inputRef?: React.RefObject | React.RefObject; } /**