fix: use typeof operators

This commit is contained in:
karishmas6
2024-09-21 21:50:54 +05:30
parent 60458b5791
commit db95038645

View File

@@ -213,7 +213,7 @@ export default class Interpreter extends EventEmitter {
: Object.entries(value).map((a) => Object.fromEntries([a]));
// every condition is treated as a single context
switch (key as keyof typeof operators) {
switch (key as (typeof operators)[number]) {
case '$and':
return array?.every((x) => this.applicable(x, context));
case '$or':