diff --git a/lib/shared/typeahead-utils.js b/lib/shared/typeahead-utils.js --- a/lib/shared/typeahead-utils.js +++ b/lib/shared/typeahead-utils.js @@ -5,6 +5,11 @@ import { threadOtherMembers } from './thread-utils'; import { stringForUserExplicit } from './user-utils'; +export type TypeaheadMatchedStrings = { + +textBeforeAtSymbol: string, + +usernamePrefix: string, +}; + function getTypeaheadUserSuggestions( userSearchIndex: SearchIndex, threadMembers: $ReadOnlyArray, diff --git a/web/chat/chat-input-bar.react.js b/web/chat/chat-input-bar.react.js --- a/web/chat/chat-input-bar.react.js +++ b/web/chat/chat-input-bar.react.js @@ -24,6 +24,7 @@ checkIfDefaultMembersAreVoiced, } from 'lib/shared/thread-utils'; import { getTypeaheadUserSuggestions } from 'lib/shared/typeahead-utils'; +import type { TypeaheadMatchedStrings } from 'lib/shared/typeahead-utils'; import type { CalendarQuery } from 'lib/types/entry-types'; import type { LoadingStatus } from 'lib/types/loading-types'; import { messageTypes } from 'lib/types/message-types'; @@ -76,10 +77,7 @@ +typeaheadMatchedStrings: ?TypeaheadMatchedStrings, +suggestedUsers: $ReadOnlyArray, }; -export type TypeaheadMatchedStrings = { - +textBeforeAtSymbol: string, - +usernamePrefix: string, -}; + class ChatInputBar extends React.PureComponent { textarea: ?HTMLTextAreaElement; multimediaInput: ?HTMLInputElement; diff --git a/web/chat/typeahead-tooltip.react.js b/web/chat/typeahead-tooltip.react.js --- a/web/chat/typeahead-tooltip.react.js +++ b/web/chat/typeahead-tooltip.react.js @@ -3,6 +3,7 @@ import classNames from 'classnames'; import * as React from 'react'; +import type { TypeaheadMatchedStrings } from 'lib/shared/typeahead-utils'; import type { RelativeMemberInfo } from 'lib/types/thread-types'; import { leastPositiveResidue } from 'lib/utils/math-utils'; @@ -13,7 +14,6 @@ getTypeaheadTooltipButtons, getTypeaheadTooltipPosition, } from '../utils/typeahead-utils'; -import type { TypeaheadMatchedStrings } from './chat-input-bar.react'; import css from './typeahead-tooltip.css'; export type TypeaheadTooltipProps = {