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.

ts: Convert search_utils to typescript.

Priyank Patele18377162c84
diff --git a/static/js/search_util.js b/static/js/search_util.ts
similarity index 79%
rename from static/js/search_util.js
rename to static/js/search_util.ts
index 24dde24bfcd..04768326675 100644
--- a/static/js/search_util.js
+++ b/static/js/search_util.ts
@@ -1,4 +1,4 @@
-export function get_search_terms(input) {
+export function get_search_terms(input: string): string[] {
const search_terms = input
.toLowerCase()
.split(",")
@@ -6,7 +6,7 @@ export function get_search_terms(input) {
return search_terms;
}
-export function vanilla_match(opts) {
+export function vanilla_match(opts: {val: string; search_terms: string[]}): boolean {
/*
This is a pretty vanilla search criteria
where we see if any of our search terms