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.

search: Fix implicit use of any.

Anders Kaseorg38f040ad79b2
diff --git a/web/src/search.ts b/web/src/search.ts
index 2c6f1733f67..e64dbebd108 100644
--- a/web/src/search.ts
+++ b/web/src/search.ts
@@ -70,7 +70,7 @@ export function initialize({on_narrow_search}: {on_narrow_search: OnNarrowSearch
// (It's a bit of legacy that we have an object with only one important
// field. There's also a "search_string" field on each element that actually
// just represents the key of the hash, so it's redundant.)
- let search_map = new Map();
+ let search_map = new Map<string, search_suggestion.Suggestion>();
const bootstrap_typeahead_input: TypeaheadInputElement = {
$element: $search_query_box,
diff --git a/web/src/search_suggestion.ts b/web/src/search_suggestion.ts
index c0fdea5a3eb..83100df3cd8 100644
--- a/web/src/search_suggestion.ts
+++ b/web/src/search_suggestion.ts
@@ -24,7 +24,7 @@ type UserPillItem = {
type TermPattern = Omit<NarrowTerm, "operand"> & Partial<Pick<NarrowTerm, "operand">>;
-type Suggestion = {
+export type Suggestion = {
description_html: string;
search_string: string;
is_person?: boolean;