@types/clone-stats 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
clone-stats/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
clone-stats/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Installation
2
+ > `npm install --save @types/clone-stats`
3
+
4
+ # Summary
5
+ This package contains type definitions for clone-stats (https://github.com/hughsk/clone-stats).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/clone-stats.
9
+ ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/clone-stats/index.d.ts)
10
+ ````ts
11
+ /// <reference types="node" />
12
+
13
+ import { Stats } from "fs";
14
+
15
+ /**
16
+ * Safely clone a Node.js fs.Stats instance without losing class methods.
17
+ *
18
+ * @param stats - The fs.Stats instance to clone
19
+ * @returns A new Stats instance with the same properties
20
+ *
21
+ * @example
22
+ * ```javascript
23
+ * var fs = require('fs');
24
+ * var cloneStats = require('clone-stats');
25
+ *
26
+ * var stats = fs.statSync('file.txt');
27
+ * var cloned = cloneStats(stats);
28
+ *
29
+ * cloned.isFile(); // still works!
30
+ * ```
31
+ */
32
+ declare function cloneStats(stats: Stats): Stats;
33
+
34
+ export = cloneStats;
35
+
36
+ ````
37
+
38
+ ### Additional Details
39
+ * Last updated: Thu, 05 Feb 2026 08:45:22 GMT
40
+ * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
41
+
42
+ # Credits
43
+ These definitions were written by [gaspard](https://github.com/gasp).
clone-stats/index.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ /// <reference types="node" />
2
+
3
+ import { Stats } from "fs";
4
+
5
+ /**
6
+ * Safely clone a Node.js fs.Stats instance without losing class methods.
7
+ *
8
+ * @param stats - The fs.Stats instance to clone
9
+ * @returns A new Stats instance with the same properties
10
+ *
11
+ * @example
12
+ * ```javascript
13
+ * var fs = require('fs');
14
+ * var cloneStats = require('clone-stats');
15
+ *
16
+ * var stats = fs.statSync('file.txt');
17
+ * var cloned = cloneStats(stats);
18
+ *
19
+ * cloned.isFile(); // still works!
20
+ * ```
21
+ */
22
+ declare function cloneStats(stats: Stats): Stats;
23
+
24
+ export = cloneStats;
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@types/clone-stats",
3
+ "version": "1.0.0",
4
+ "description": "TypeScript definitions for clone-stats",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/clone-stats",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "gaspard",
10
+ "githubUsername": "gasp",
11
+ "url": "https://github.com/gasp"
12
+ }
13
+ ],
14
+ "main": "",
15
+ "types": "index.d.ts",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
19
+ "directory": "types/clone-stats"
20
+ },
21
+ "scripts": {},
22
+ "dependencies": {
23
+ "@types/node": "*"
24
+ },
25
+ "peerDependencies": {},
26
+ "typesPublisherContentHash": "33886762f915964b4f9a7efa3e7120a2fdd038a1eb977765afe8a8dc6cbe6558",
27
+ "typeScriptVersion": "5.2"
28
+ }