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
11 lines (10 loc) • 482 B
TypeScript
import type { Plain } from './types';
/**
* Converts a data structure through recursive calls to toJSON methods if they exist for each value.
* If the method doesn't exist, the original value is returned.
* Values for which there is no call method will remain in their original value.
* @param value Value for conversion
* @param recursive Perform nested processing
* @returns The converted value
*/
export declare function plain<T>(value: T, recursive?: boolean): Plain<T>;