@types/clone-stats
v1.0.0
Published
TypeScript definitions for clone-stats
Readme
Installation
npm install --save @types/clone-stats
Summary
This package contains type definitions for clone-stats (https://github.com/hughsk/clone-stats).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/clone-stats.
index.d.ts
/// <reference types="node" />
import { Stats } from "fs";
/**
* Safely clone a Node.js fs.Stats instance without losing class methods.
*
* @param stats - The fs.Stats instance to clone
* @returns A new Stats instance with the same properties
*
* @example
* ```javascript
* var fs = require('fs');
* var cloneStats = require('clone-stats');
*
* var stats = fs.statSync('file.txt');
* var cloned = cloneStats(stats);
*
* cloned.isFile(); // still works!
* ```
*/
declare function cloneStats(stats: Stats): Stats;
export = cloneStats;
Additional Details
- Last updated: Thu, 05 Feb 2026 08:45:22 GMT
- Dependencies: @types/node
Credits
These definitions were written by gaspard.
