UNPKG

635 BTypeScriptView Raw
1/**
2Merges "own" properties from a source to a destination object, including non-enumerable and accessor-defined properties. It retains original values and descriptors, ensuring the destination receives a complete and accurate copy of the source's properties.
3
4@param destination - The object to receive properties.
5@param source - The object providing properties.
6@param overwrite - Optional boolean to control overwriting of existing properties. Defaults to true.
7@returns The modified destination object.
8*/
9declare function mergeDescriptors<T, U>(destination: T, source: U, overwrite?: boolean): T & U;
10
11export = mergeDescriptors;