@types/clone

  • Version 2.1.4
  • Published
  • 6.53 kB
  • No dependencies
  • MIT license

Install

npm i @types/clone
yarn add @types/clone
pnpm add @types/clone

Overview

TypeScript definitions for clone

Index

Functions

function clone

clone: typeof clone;
  • Parameter val

    the value that you want to clone, any type allowed

    Parameter 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.

    Parameter depth

    to which the object is to be cloned (optional, defaults to infinity)

    Parameter prototype

    Sets the prototype to be used when cloning an Object (optional, defaults to __proto__)

    Parameter includeNonEnumerable

    Set to true if the non-enumerable properties should be cloned as well (optional, defaults to false)

  • Parameter val

    the value that you want to clone, any type allowed

    Parameter opts

    a single object that specifies circular, depth, prototype and includeNonEnumerable.

    Parameter

    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.

    Parameter

    opts.depth Sets depth to which the object is to be cloned (optional, defaults to infinity)

    Parameter

    opts.prototype Sets the prototype to be used when cloning an Object (optional, defaults to __proto__)

    Parameter

    opts.includeNonEnumerable Set to true if the non-enumerable properties should be cloned as well (optional, defaults to false)

function clonePrototype

clonePrototype: <T>(obj: T) => T;
  • Parameter obj

    the object that you want to clone

Package Files (1)

Dependencies (0)

No dependencies.

Dev Dependencies (0)

No dev dependencies.

Peer Dependencies (0)

No peer dependencies.

Badge

To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/clone.

  • Markdown
    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/clone)
  • HTML
    <a href="https://www.jsdocs.io/package/@types/clone"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>