UNPKG

@signaldb/core

Version:

SignalDB is a client-side database that provides a simple MongoDB-like interface to the data with first-class typescript support to achieve an optimistic UI. Data persistence can be achieved by using storage providers that store the data through a JSON in

12 lines (11 loc) 598 B
import type { FieldExpression } from '../types/Selector'; /** * Determines whether a given object is a valid field expression. * A field expression is an object containing query operators supported by MongoDB-style queries. * @template T - The type of the field expression. * @param expression - The object to test. * @returns A boolean indicating whether the object is a valid field expression. * - `true` if the object contains only recognized query operators. * - `false` otherwise. */ export default function isFieldExpression<T>(expression: any): expression is FieldExpression<T>;