merge-change
Version:
Advanced library for deep merging, patching, and immutable updates of data structures. Features declarative operations for specific merging behaviors, property management, custom type merging rules, and difference tracking. Supports complex data transform
17 lines (16 loc) • 609 B
TypeScript
import { OperationFn, Operations } from './types';
export declare const defaultOperations: Record<Operations, OperationFn>;
/**
* Checking if a declarative operation exists
* @param operation
* @param operations
* @returns {boolean}
*/
export declare function isOperation(operation: unknown, operations?: Record<string, OperationFn>): operation is Operations;
/**
* Extract operations from object
* @param object
* @param operations
* @returns {Object}
*/
export declare function extractOperations<T extends Record<string, unknown>>(object: T, operations?: Record<string, OperationFn>): Partial<T>;