Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@types/clone
Advanced tools
TypeScript definitions for clone
npm install --save @types/clone
This package contains type definitions for clone (https://github.com/pvorb/node-clone).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/clone.
/**
* See clone JS source for API docs
*/
/**
* @param val the value that you want to clone, any type allowed
* @param circular Call clone with circular set to false if you are certain that obj contains no circular references. This will give better performance if needed. There is no error if undefined or null is passed as obj.
* @param depth to which the object is to be cloned (optional, defaults to infinity)
* @param prototype Sets the prototype to be used when cloning an Object (optional, defaults to __proto__)
* @param includeNonEnumerable Set to true if the non-enumerable properties should be cloned as well (optional, defaults to false)
*/
declare function clone<T>(
val: T,
circular?: boolean,
depth?: number,
prototype?: any,
includeNonEnumerable?: boolean,
): T;
/**
* @param val the value that you want to clone, any type allowed
* @param opts a single object that specifies circular, depth, prototype and includeNonEnumerable.
* @param opts.circular Call clone with circular set to false if you are certain that obj contains no circular references. This will give better performance if needed. There is no error if undefined or null is passed as obj.
* @param opts.depth Sets depth to which the object is to be cloned (optional, defaults to infinity)
* @param opts.prototype Sets the prototype to be used when cloning an Object (optional, defaults to __proto__)
* @param opts.includeNonEnumerable Set to true if the non-enumerable properties should be cloned as well (optional, defaults to false)
*/
declare function clone<T>(val: T, opts: CloneOpts): T;
interface CloneOpts {
circular?: boolean | undefined;
depth?: number | undefined;
prototype?: any;
includeNonEnumerable?: boolean | undefined;
}
declare namespace clone {
/**
* @param obj the object that you want to clone
*/
function clonePrototype<T>(obj: T): T;
}
export = clone;
These definitions were written by Kieran Simpson, and DG-za.
FAQs
TypeScript definitions for clone
The npm package @types/clone receives a total of 171,064 weekly downloads. As such, @types/clone popularity was classified as popular.
We found that @types/clone demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.