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.

filter: Use correct parameter types for `has_operand`.

Aman Agrawala6ad5032a4e7
diff --git a/web/src/filter.ts b/web/src/filter.ts
index a2d285704f8..8df3e4ce306 100644
--- a/web/src/filter.ts
+++ b/web/src/filter.ts
@@ -1041,7 +1041,10 @@ export class Filter {
);
}
- has_operand_case_insensitive(operator: string, operand: string): boolean {
+ has_operand_case_insensitive(
+ operator: NarrowTerm["operator"],
+ operand: NarrowTerm["operand"],
+ ): boolean {
return this._terms.some(
(term) =>
!term.negated &&
@@ -1050,7 +1053,7 @@ export class Filter {
);
}
- has_operand(operator: string, operand: string): boolean {
+ has_operand(operator: NarrowTerm["operator"], operand: NarrowTerm["operand"]): boolean {
return this._terms.some(
(term) => !term.negated && term.operator === operator && term.operand === operand,
);