valia
Version:
A runtime data validator in TypeScript with advanced type inference, built-in validation functions, and seamless integration for server and client environments.
12 lines (11 loc) • 496 B
TypeScript
import type { SetableCriteria } from "../formats";
/**
* Clones the object starting from the root and stops traversing a branch
* when a mounted criteria node is encountered. In such cases, the mounted
* object encountered see its internal properties copied to a new reference
* so that the junction is a unique reference in the tree.
*
* @param src Source object of the clone
* @returns Clone of the source object
*/
export declare function cloner<T extends SetableCriteria>(src: T): T;