Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

typeahead_helper: Add type CombinedPillItem.

afeefuddin0b7c63a69569
diff --git a/web/src/typeahead_helper.ts b/web/src/typeahead_helper.ts
index 6a86111b6fc..5206f8bcd8e 100644
--- a/web/src/typeahead_helper.ts
+++ b/web/src/typeahead_helper.ts
@@ -7,7 +7,7 @@ import render_typeahead_list_item from "../templates/typeahead_list_item.hbs";
import * as buddy_data from "./buddy_data";
import * as compose_state from "./compose_state";
-import type {InputPillContainer} from "./input_pill";
+import type {InputPillContainer, InputPillItem} from "./input_pill";
import * as people from "./people";
import type {PseudoMentionUser, User} from "./people";
import * as pm_conversations from "./pm_conversations";
@@ -31,6 +31,11 @@ export type UserOrMentionPillData = UserOrMention & {type: "user_or_mention"};
export type CombinedPillContainer = InputPillContainer<StreamPill | UserGroupPill | UserPill>;
+export type CombinedPillItem =
+ | InputPillItem<UserPill>
+ | InputPillItem<UserGroupPill>
+ | InputPillItem<StreamPill>;
+
// Returns an array of direct message recipients, removing empty elements.
// For example, "a,,b, " => ["a", "b"]
export function get_cleaned_pm_recipients(query_string: string): string[] {