@kikiutils/shared 18.0.0 → 18.1.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.
Files changed (156) hide show
  1. package/dist/buffer.d.ts +19 -21
  2. package/dist/buffer.d.ts.map +1 -1
  3. package/dist/buffer.js +18 -19
  4. package/dist/buffer.js.map +1 -1
  5. package/dist/classes/enhanced-date.d.ts +425 -0
  6. package/dist/classes/enhanced-date.d.ts.map +1 -0
  7. package/dist/classes/enhanced-date.js +591 -0
  8. package/dist/classes/enhanced-date.js.map +1 -0
  9. package/dist/classes/path.d.ts +211 -48
  10. package/dist/classes/path.d.ts.map +1 -1
  11. package/dist/classes/path.js +181 -52
  12. package/dist/classes/path.js.map +1 -1
  13. package/dist/classes/precision-number.d.ts +44 -39
  14. package/dist/classes/precision-number.d.ts.map +1 -1
  15. package/dist/classes/precision-number.js +51 -45
  16. package/dist/classes/precision-number.js.map +1 -1
  17. package/dist/classes/ssh-client.d.ts +3 -4
  18. package/dist/classes/ssh-client.d.ts.map +1 -1
  19. package/dist/classes/ssh-client.js +2 -2
  20. package/dist/classes/ssh-client.js.map +1 -1
  21. package/dist/clipboard.d.ts +25 -26
  22. package/dist/clipboard.d.ts.map +1 -1
  23. package/dist/clipboard.js +23 -23
  24. package/dist/clipboard.js.map +1 -1
  25. package/dist/consola.d.ts +12 -15
  26. package/dist/consola.d.ts.map +1 -1
  27. package/dist/consola.js +10 -12
  28. package/dist/consola.js.map +1 -1
  29. package/dist/crypto-hash.d.ts +65 -56
  30. package/dist/crypto-hash.d.ts.map +1 -1
  31. package/dist/crypto-hash.js +55 -45
  32. package/dist/crypto-hash.js.map +1 -1
  33. package/dist/datetime.d.ts +41 -53
  34. package/dist/datetime.d.ts.map +1 -1
  35. package/dist/datetime.js +53 -66
  36. package/dist/datetime.js.map +1 -1
  37. package/dist/element-plus.d.ts +13 -14
  38. package/dist/element-plus.d.ts.map +1 -1
  39. package/dist/element-plus.js +11 -11
  40. package/dist/element-plus.js.map +1 -1
  41. package/dist/enum.d.ts +39 -36
  42. package/dist/enum.d.ts.map +1 -1
  43. package/dist/enum.js +36 -32
  44. package/dist/enum.js.map +1 -1
  45. package/dist/env.d.ts +22 -15
  46. package/dist/env.d.ts.map +1 -1
  47. package/dist/env.js +20 -12
  48. package/dist/env.js.map +1 -1
  49. package/dist/event-awaiter.d.ts +47 -52
  50. package/dist/event-awaiter.d.ts.map +1 -1
  51. package/dist/event-awaiter.js +46 -50
  52. package/dist/event-awaiter.js.map +1 -1
  53. package/dist/general.d.ts +22 -17
  54. package/dist/general.d.ts.map +1 -1
  55. package/dist/general.js.map +1 -1
  56. package/dist/hash.d.ts +24 -21
  57. package/dist/hash.d.ts.map +1 -1
  58. package/dist/hash.js +20 -16
  59. package/dist/hash.js.map +1 -1
  60. package/dist/math.d.ts +20 -19
  61. package/dist/math.d.ts.map +1 -1
  62. package/dist/math.js +14 -12
  63. package/dist/math.js.map +1 -1
  64. package/dist/number.d.ts +10 -9
  65. package/dist/number.d.ts.map +1 -1
  66. package/dist/number.js +9 -7
  67. package/dist/number.js.map +1 -1
  68. package/dist/object.d.ts +22 -10
  69. package/dist/object.d.ts.map +1 -1
  70. package/dist/object.js +21 -8
  71. package/dist/object.js.map +1 -1
  72. package/dist/pino.d.ts +12 -15
  73. package/dist/pino.d.ts.map +1 -1
  74. package/dist/pino.js +10 -15
  75. package/dist/pino.js.map +1 -1
  76. package/dist/random.d.ts +17 -15
  77. package/dist/random.d.ts.map +1 -1
  78. package/dist/random.js +16 -13
  79. package/dist/random.js.map +1 -1
  80. package/dist/redis/script-runner.d.ts +57 -0
  81. package/dist/redis/script-runner.d.ts.map +1 -0
  82. package/dist/redis/script-runner.js +46 -0
  83. package/dist/redis/script-runner.js.map +1 -0
  84. package/dist/storages/lru/keyed-store.d.ts +18 -14
  85. package/dist/storages/lru/keyed-store.d.ts.map +1 -1
  86. package/dist/storages/lru/keyed-store.js +17 -12
  87. package/dist/storages/lru/keyed-store.js.map +1 -1
  88. package/dist/storages/redis/keyed-store.d.ts +11 -21
  89. package/dist/storages/redis/keyed-store.d.ts.map +1 -1
  90. package/dist/storages/redis/keyed-store.js +10 -19
  91. package/dist/storages/redis/keyed-store.js.map +1 -1
  92. package/dist/storages/redis/msgpack.d.ts +33 -13
  93. package/dist/storages/redis/msgpack.d.ts.map +1 -1
  94. package/dist/storages/redis/msgpack.js +32 -11
  95. package/dist/storages/redis/msgpack.js.map +1 -1
  96. package/dist/storages/redis/types.d.ts +34 -17
  97. package/dist/storages/redis/types.d.ts.map +1 -1
  98. package/dist/string.d.ts +12 -11
  99. package/dist/string.d.ts.map +1 -1
  100. package/dist/string.js +20 -15
  101. package/dist/string.js.map +1 -1
  102. package/dist/time.d.ts +35 -10
  103. package/dist/time.d.ts.map +1 -1
  104. package/dist/time.js +49 -9
  105. package/dist/time.js.map +1 -1
  106. package/dist/types/filtered-key-path.d.ts +4 -15
  107. package/dist/types/filtered-key-path.d.ts.map +1 -1
  108. package/dist/types/index.d.ts +10 -10
  109. package/dist/types/index.d.ts.map +1 -1
  110. package/dist/types/vue.d.ts +7 -7
  111. package/dist/types/vue.d.ts.map +1 -1
  112. package/dist/url.d.ts +15 -14
  113. package/dist/url.d.ts.map +1 -1
  114. package/dist/url.js +12 -10
  115. package/dist/url.js.map +1 -1
  116. package/dist/vue.d.ts +19 -21
  117. package/dist/vue.d.ts.map +1 -1
  118. package/dist/vue.js +15 -16
  119. package/dist/vue.js.map +1 -1
  120. package/dist/web.d.ts +14 -11
  121. package/dist/web.d.ts.map +1 -1
  122. package/dist/web.js +12 -8
  123. package/dist/web.js.map +1 -1
  124. package/package.json +20 -20
  125. package/src/buffer.ts +18 -19
  126. package/src/classes/enhanced-date.ts +665 -0
  127. package/src/classes/path.ts +232 -91
  128. package/src/classes/precision-number.ts +61 -53
  129. package/src/classes/ssh-client.ts +8 -5
  130. package/src/clipboard.ts +23 -23
  131. package/src/consola.ts +10 -12
  132. package/src/crypto-hash.ts +55 -45
  133. package/src/datetime.ts +65 -85
  134. package/src/element-plus.ts +11 -11
  135. package/src/enum.ts +36 -32
  136. package/src/env.ts +20 -12
  137. package/src/event-awaiter.ts +49 -50
  138. package/src/general.ts +20 -14
  139. package/src/hash.ts +20 -16
  140. package/src/math.ts +18 -16
  141. package/src/number.ts +9 -7
  142. package/src/object.ts +21 -8
  143. package/src/pino.ts +11 -15
  144. package/src/random.ts +16 -13
  145. package/src/redis/script-runner.ts +107 -0
  146. package/src/storages/lru/keyed-store.ts +17 -12
  147. package/src/storages/redis/keyed-store.ts +10 -19
  148. package/src/storages/redis/msgpack.ts +32 -11
  149. package/src/storages/redis/types.ts +32 -14
  150. package/src/string.ts +10 -8
  151. package/src/time.ts +52 -8
  152. package/src/types/filtered-key-path.ts +9 -14
  153. package/src/types/vue.ts +6 -5
  154. package/src/url.ts +12 -10
  155. package/src/vue.ts +15 -16
  156. package/src/web.ts +12 -8
@@ -8,146 +8,259 @@ type DropFirstParameters<T extends (...args: any) => any> = Parameters<T> extend
8
8
  /**
9
9
  * Values accepted by the `Path` constructor and path-composition methods.
10
10
  */
11
- type PathLike = fs.PathLike | Path;
11
+ export type PathLike = fs.PathLike | Path;
12
12
  /**
13
- * Class representing a file system path with various utility methods for path operations.
13
+ * An immutable file system path with Node.js path and file operations.
14
14
  *
15
- * All methods in the `Path` class are immutable, returning new instances with modified values
16
- * and leaving the original instance unchanged.
15
+ * @remarks
16
+ * Path-composition methods return new instances and leave this instance unchanged.
17
+ * File operations act on the stored path and forward Node.js defaults and promise rejections.
18
+ * They do not update the stored path, including after a successful rename.
19
+ * The constructor joins stringified inputs using the platform-specific Node.js path rules.
17
20
  */
18
- declare class Path {
21
+ export declare class Path {
19
22
  #private;
20
23
  /**
21
24
  * Creates a normalized path value by joining the provided path segments.
22
25
  *
23
- * @param {PathLike[]} paths - Path segments accepted by Node.js `path.join` or another `Path` instance
26
+ * @param paths - Path segments accepted by Node.js `path.join` or another `Path` instance.
24
27
  */
25
28
  constructor(...paths: PathLike[]);
26
- [Symbol.toPrimitive](hint: string): string;
27
29
  /**
28
- * @see {@link nodePath.dirname}
30
+ * The parent directory as a new `Path`; this instance is unchanged.
31
+ *
32
+ * @see {@link Path.dirname}
29
33
  */
30
34
  get parent(): Path;
31
35
  /**
32
- * Returns the internal path string value.
36
+ * The normalized path string stored by this instance.
33
37
  */
34
38
  get value(): string;
35
39
  /**
36
- * @see {@link nodePath.format}
40
+ * Creates a new path from a Node.js path object.
41
+ *
42
+ * @param pathObject - The path components to format.
43
+ *
44
+ * @returns A new normalized `Path`.
45
+ *
46
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.format}
37
47
  */
38
48
  static format(pathObject: nodePath.FormatInputPathObject): Path;
39
49
  /**
40
- * @see {@link nodePath.resolve}
50
+ * Resolves joined path segments to an absolute path.
51
+ *
52
+ * @remarks
53
+ * Inputs are joined before resolution; unlike Node.js `path.resolve`,
54
+ * later absolute segments do not reset the path.
55
+ *
56
+ * @param paths - The stringified path segments to join.
57
+ *
58
+ * @returns A new absolute `Path`.
59
+ *
60
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.resolve}
41
61
  */
42
62
  static resolve(...paths: PathLike[]): Path;
63
+ [Symbol.toPrimitive](hint: string): string;
43
64
  /**
44
- * @see {@link nodePath.basename}
65
+ * Returns the final component of this path.
66
+ *
67
+ * @param suffix - An optional exact suffix to remove.
68
+ *
69
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.basename}
45
70
  */
46
71
  basename(suffix?: string): string;
47
72
  /**
48
- * @see {@link nodePath.dirname}
73
+ * Returns the parent directory of this path.
74
+ *
75
+ * @returns A new `Path`; this instance is unchanged.
76
+ *
77
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.dirname}
49
78
  */
50
79
  dirname(): Path;
51
80
  /**
52
- * @see {@link nodePath.extname}
81
+ * Returns the extension of the final path component.
82
+ *
83
+ * @returns The extension including its leading dot, or an empty string when absent.
84
+ *
85
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.extname}
53
86
  */
54
87
  extname(): string;
55
88
  /**
56
- * @see {@link nodePath.isAbsolute}
89
+ * Checks whether this path is absolute on the current platform.
90
+ *
91
+ * @returns Whether this path is absolute.
92
+ *
93
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.isAbsolute}
57
94
  */
58
95
  isAbsolute(): boolean;
59
96
  /**
60
- * @see {@link nodePath.normalize}
97
+ * Normalizes separators and relative segments in this path.
98
+ *
99
+ * @returns A new `Path`; this instance is unchanged.
100
+ *
101
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.normalize}
61
102
  */
62
103
  normalize(): Path;
63
104
  /**
64
- * @see {@link nodePath.join}
105
+ * Joins additional segments onto this path.
106
+ *
107
+ * @param paths - The stringified path segments to append.
108
+ *
109
+ * @returns A new normalized `Path`; this instance is unchanged.
110
+ *
111
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.join}
65
112
  */
66
113
  join(...paths: PathLike[]): Path;
67
114
  /**
68
- * @see {@link nodePath.parse}
115
+ * Parses this path into its root, directory, basename, extension, and name.
116
+ *
117
+ * @returns A new object containing the path components.
118
+ *
119
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.parse}
69
120
  */
70
121
  parse(): nodePath.ParsedPath;
71
122
  /**
72
- * @see {@link nodePath.relative}
123
+ * Computes a relative path from this path to the destination.
124
+ *
125
+ * @param to - The destination path.
126
+ *
127
+ * @returns A new `Path`; this instance is unchanged.
128
+ *
129
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.relative}
73
130
  */
74
131
  relative(to: PathLike): Path;
75
132
  /**
76
- * @see {@link nodePath.resolve}
133
+ * Resolves this path to an absolute path using the current working directory.
134
+ *
135
+ * @remarks
136
+ * Relative paths use the current working directory. This instance is unchanged.
137
+ *
138
+ * @returns A new absolute `Path`.
139
+ *
140
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.resolve}
77
141
  */
78
142
  resolve(): Path;
79
143
  toJSON(): string;
80
144
  /**
81
- * @see {@link nodePath.toNamespacedPath}
145
+ * Converts this path to the Windows namespace form when applicable.
146
+ *
147
+ * @returns The namespace-converted path string; this instance is unchanged.
148
+ * On non-Windows platforms, the path text is unchanged.
149
+ *
150
+ * @see {@link https://nodejs.org/api/path.html | Node.js path.toNamespacedPath}
82
151
  */
83
152
  toNamespacedPath(): string;
84
153
  /**
85
- * Converts the Path instance to a string.
86
- * This method returns the internal path string value,
87
- * making it useful for implicit and explicit string conversions.
154
+ * Returns the stored path as a string.
88
155
  */
89
156
  toString(): string;
90
157
  /**
91
- * @see {@link fsp.access}
158
+ * Checks access permissions for the stored path.
159
+ *
160
+ * @remarks
161
+ * The promise resolves when the access check succeeds and rejects if access is denied or the path is missing.
162
+ *
163
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.access}
92
164
  */
93
165
  access(...args: DropFirstParameters<typeof fsp.access>): Promise<void>;
94
166
  /**
95
- * @see {@link fsp.appendFile}
167
+ * Appends data to the file at the stored path.
168
+ *
169
+ * @remarks
170
+ * The promise resolves when appending completes; a missing file is created according to the supplied options.
171
+ *
172
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.appendFile}
96
173
  */
97
174
  appendFile(...args: DropFirstParameters<typeof fsp.appendFile>): Promise<void>;
98
175
  /**
99
- * @see {@link fsp.chmod}
176
+ * Changes the permissions of the stored path.
177
+ *
178
+ * @remarks
179
+ * The promise resolves when the permissions are changed.
180
+ *
181
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.chmod}
100
182
  */
101
183
  chmod(...args: DropFirstParameters<typeof fsp.chmod>): Promise<void>;
102
184
  /**
103
- * @see {@link fsp.chown}
185
+ * Changes the owner and group of the stored path.
186
+ *
187
+ * @remarks
188
+ * The promise resolves when the ownership is changed.
189
+ *
190
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.chown}
104
191
  */
105
192
  chown(...args: DropFirstParameters<typeof fsp.chown>): Promise<void>;
106
193
  /**
107
- * @see {@link fsp.copyFile}
194
+ * Copies the file at the stored path to a destination.
195
+ *
196
+ * @remarks
197
+ * The promise resolves when copying completes. The stored path remains the source path.
198
+ *
199
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.copyFile}
108
200
  */
109
201
  copyFile(...args: DropFirstParameters<typeof fsp.copyFile>): Promise<void>;
110
202
  /**
111
- * @see {@link fsp.mkdir}
203
+ * Creates a directory at the stored path.
204
+ *
205
+ * @remarks
206
+ * The promise resolves after creation. Recursive mode resolves to the first created directory path, or
207
+ * `undefined` if no directory is created; nonrecursive mode resolves without a value.
208
+ *
209
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.mkdir}
112
210
  */
113
211
  mkdir(options: fs.MakeDirectoryOptions & {
114
212
  recursive: true;
115
- }): Promise<string>;
213
+ }): Promise<string | undefined>;
116
214
  mkdir(options?: (fs.MakeDirectoryOptions & {
117
215
  recursive?: false;
118
216
  }) | fs.Mode | null): Promise<void>;
119
217
  mkdir(options?: fs.MakeDirectoryOptions | fs.Mode | null): Promise<string | undefined>;
120
218
  /**
121
- * @see {@link fsp.open}
219
+ * Opens the file at the stored path.
220
+ *
221
+ * @remarks
222
+ * The promise resolves to a new file handle. The caller must close the handle when it is no longer needed.
223
+ *
224
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.open}
122
225
  */
123
226
  open(...args: DropFirstParameters<typeof fsp.open>): Promise<fs.promises.FileHandle>;
124
227
  /**
125
- * @see {@link fsp.readdir}
228
+ * Reads the entries of the directory at the stored path.
229
+ *
230
+ * @remarks
231
+ * The promise resolves to names, buffers, or directory entries according to the options.
232
+ *
233
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.readdir}
126
234
  */
127
- readdir(path: PathLike, options?: BufferEncoding | (fs.ObjectEncodingOptions & {
235
+ readdir(options?: BufferEncoding | (fs.ObjectEncodingOptions & {
128
236
  recursive?: boolean;
129
237
  withFileTypes?: false;
130
238
  }) | null): Promise<string[]>;
131
- readdir(path: PathLike, options: 'buffer' | {
239
+ readdir(options: 'buffer' | {
132
240
  encoding: 'buffer';
133
241
  recursive?: boolean;
134
242
  withFileTypes?: false;
135
243
  }): Promise<Buffer[]>;
136
- readdir(path: PathLike, options?: BufferEncoding | (fs.ObjectEncodingOptions & {
244
+ readdir(options?: BufferEncoding | (fs.ObjectEncodingOptions & {
137
245
  recursive?: boolean;
138
246
  withFileTypes?: false;
139
247
  }) | null): Promise<Buffer[] | string[]>;
140
- readdir(path: PathLike, options: fs.ObjectEncodingOptions & {
248
+ readdir(options: fs.ObjectEncodingOptions & {
141
249
  recursive?: boolean;
142
250
  withFileTypes: true;
143
251
  }): Promise<fs.Dirent[]>;
144
- readdir(path: PathLike, options: {
252
+ readdir(options: {
145
253
  encoding: 'buffer';
146
254
  recursive?: boolean;
147
255
  withFileTypes: true;
148
256
  }): Promise<fs.Dirent<Buffer>[]>;
149
257
  /**
150
- * @see {@link fsp.readFile}
258
+ * Reads the entire file at the stored path.
259
+ *
260
+ * @remarks
261
+ * The promise resolves to a string when a text encoding is supplied, or a `Buffer` otherwise.
262
+ *
263
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.readFile}
151
264
  */
152
265
  readFile(options?: (Abortable & {
153
266
  encoding?: null;
@@ -161,40 +274,90 @@ declare class Path {
161
274
  flag?: fs.OpenMode;
162
275
  }) | BufferEncoding | null): Promise<Buffer | string>;
163
276
  /**
164
- * @see {@link fsp.rename}
277
+ * Renames or moves the file or directory at the stored path.
278
+ *
279
+ * @remarks
280
+ * The promise resolves when the rename completes. This instance retains its original stored path.
281
+ *
282
+ * @param newPath - The destination path; this instance retains its original value.
283
+ *
284
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.rename}
165
285
  */
166
286
  rename(newPath: PathLike): Promise<void>;
167
287
  /**
168
- * @see {@link fsp.rm}
288
+ * Removes the file or directory at the stored path.
289
+ *
290
+ * @remarks
291
+ * The promise resolves after removal according to the supplied options.
292
+ *
293
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.rm}
169
294
  */
170
295
  rm(...args: DropFirstParameters<typeof fsp.rm>): Promise<void>;
171
296
  /**
172
- * @see {@link fsp.rmdir}
297
+ * Removes the directory at the stored path.
298
+ *
299
+ * @remarks
300
+ * The promise resolves after directory removal.
301
+ *
302
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.rmdir}
173
303
  */
174
304
  rmdir(...args: DropFirstParameters<typeof fsp.rmdir>): Promise<void>;
175
305
  /**
176
- * @see {@link fsp.stat}
306
+ * Reads file system metadata for the stored path.
307
+ *
308
+ * @remarks
309
+ * The promise resolves to `Stats`, or `BigIntStats` when `bigint` is enabled.
310
+ * If `throwIfNoEntry` is `false`, a missing path resolves to `undefined` instead of rejecting.
311
+ *
312
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.stat}
177
313
  */
178
314
  stat(opts?: fs.StatOptions & {
179
315
  bigint?: false;
316
+ throwIfNoEntry?: true;
180
317
  }): Promise<fs.Stats>;
181
318
  stat(opts: fs.StatOptions & {
182
319
  bigint: true;
320
+ throwIfNoEntry?: true;
183
321
  }): Promise<fs.BigIntStats>;
184
- stat(opts?: fs.StatOptions): Promise<fs.BigIntStats | fs.Stats>;
322
+ stat(opts: fs.StatOptions & {
323
+ bigint?: false;
324
+ throwIfNoEntry: false;
325
+ }): Promise<fs.Stats | undefined>;
326
+ stat(opts: fs.StatOptions & {
327
+ bigint: true;
328
+ throwIfNoEntry: false;
329
+ }): Promise<fs.BigIntStats | undefined>;
330
+ stat(opts: fs.StatOptions & {
331
+ throwIfNoEntry?: true;
332
+ }): Promise<fs.BigIntStats | fs.Stats>;
333
+ stat(opts?: fs.StatOptions): Promise<fs.BigIntStats | fs.Stats | undefined>;
185
334
  /**
186
- * @see {@link fsp.truncate}
335
+ * Truncates or extends the file at the stored path.
336
+ *
337
+ * @remarks
338
+ * The promise resolves when the file reaches the requested length in bytes; the default length is `0`.
339
+ *
340
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.truncate}
187
341
  */
188
342
  truncate(...args: DropFirstParameters<typeof fsp.truncate>): Promise<void>;
189
343
  /**
190
- * @see {@link fsp.unlink}
344
+ * Deletes the file or symbolic link at the stored path.
345
+ *
346
+ * @remarks
347
+ * The promise resolves after deletion; directories are not removed.
348
+ *
349
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.unlink}
191
350
  */
192
351
  unlink(): Promise<void>;
193
352
  /**
194
- * @see {@link fsp.writeFile}
353
+ * Writes data to the file at the stored path.
354
+ *
355
+ * @remarks
356
+ * The promise resolves when writing completes; the default flag replaces existing file contents.
357
+ *
358
+ * @see {@link https://nodejs.org/api/fs.html | Node.js fsPromises.writeFile}
195
359
  */
196
360
  writeFile(...args: DropFirstParameters<typeof fsp.writeFile>): Promise<void>;
197
361
  }
198
362
  //#endregion
199
- export { Path, PathLike };
200
363
  //# sourceMappingURL=path.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"path.d.ts","names":[],"sources":["../../src/classes/path.ts"],"mappings":";;;;;;KAmBK,oBAAoB,cAAc,qBAAqB,WAAW,0BAA0B,KAAK;;;;KAK1F,WAAW,GAAG,WAAW;;;;;;;cAQxB;;;;;;;EAQG,eAAG,OAAO;GASrB,OAAO,aAAa;;;;MAmBjB,UAAM;;;;MAON;;;;SASG,OAAO,YAAY,SAAS,wBAAqB;;;;SAOjD,WAAW,OAAO,aAAU;;;;EASnC,SAAS;;;;EAOT,WAAO;;;;EAOP;;;;EAOA;;;;EAOA,aAAS;;;;EAOT,QAAQ,OAAO,aAAU;;;;EAOzB,SAAK,SAAA;;;;EAOL,SAAS,IAAI,WAAQ;;;;EAOrB,WAAO;EAIP;;;;EAOA;;;;;;EASA;;;;EASA,UAAU,MAAM,2BAA2B,IAAI,UAAO;;;;EAOtD,cAAc,MAAM,2BAA2B,IAAI,cAAW;;;;EAO9D,SAAS,MAAM,2BAA2B,IAAI,SAAM;;;;EAOpD,SAAS,MAAM,2BAA2B,IAAI,SAA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