@magicbell/core
Version:
Official MagicBell API wrapper
18 lines (17 loc) • 737 B
TypeScript
import { Notification } from '../models/index.js';
export type NotificationCompareStrategy = (notification: Notification, context: any, comparator?: (left: any, right: any) => boolean) => {
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 compareAttributeStrategy(notification: Notification, context: any, comparator?: (value: any, other: any) => boolean): {
result: boolean;
delta: string[];
};