UNPKG

@magicbell/react-headless

Version:
19 lines (18 loc) 841 B
import { IRemoteNotification } from '../../../types/index.js'; import { IStrategyComparator } from '../../../types/INotificationStore.js'; export type NotificationCompareStrategy = (notification: IRemoteNotification, context: Record<string, unknown>, comparator?: IStrategyComparator) => { result: boolean; delta: string[]; }; /** * Check if a notification satisfies all conditions of the given `context`. It * Uses equal to compare. * * @param notification Notification to test * @param context Set of rules to test the notification against * @param comparator Function used to compare notification attributes and context values */ export declare function objMatchesContext(notification: IRemoteNotification, context: Record<string, unknown>, comparator?: IStrategyComparator): { result: boolean; delta: string[]; };