mingo
Version:
MongoDB query language for in-memory objects
14 lines (13 loc) • 480 B
TypeScript
import { Any, AnyObject, Options } from "../../../types";
/**
* An operator that evaluates a series of case expressions. When it finds an expression which
* evaluates to true, it returns the resulting expression for that case. If none of the cases
* evaluate to true, it returns the default expression.
*/
export declare const $switch: (obj: AnyObject, expr: {
branches: Array<{
case: Any;
then: Any;
}>;
default: Any;
}, options: Options) => Any;