This commit is contained in:
2026-08-14 16:03:47 +01:00
parent fd53e3f4fb
commit dfdc3b2840
2463 changed files with 186456 additions and 111315 deletions
+6 -6
View File
@@ -2,7 +2,7 @@ import { type GzipOptions, type ZlibOptions } from 'minizlib';
import { type Stats } from 'node:fs';
import { type ReadEntry } from './read-entry.js';
import { type WarnData } from './warn-method.js';
import { WriteEntry } from './write-entry.js';
import type { WriteEntry } from './write-entry.js';
/**
* The options that can be provided to tar commands.
*
@@ -112,7 +112,7 @@ export interface TarOptions {
* Note: if `strict` is set, then the warning will throw, and this method
* will not be called.
*/
onwarn?: (code: string, message: string, data: WarnData) => any;
onwarn?: (code: string, message: string, data: WarnData) => unknown;
/**
* When extracting, unlink files before creating them. Without this option,
* tar overwrites existing files, which preserves existing hardlinks. With
@@ -186,7 +186,7 @@ export interface TarOptions {
* [MiniPass](http://npm.im/minipass)-based streams are designed for this use
* case.
*/
transform?: (entry: ReadEntry) => any;
transform?: (entry: ReadEntry) => ReadEntry;
/**
* Call `chmod()` to ensure that extracted files match the entry's mode
* field. Without this field set, all mode fields in archive entries are a
@@ -238,7 +238,7 @@ export interface TarOptions {
* When creating, updating, or replacing within archives, this method will
* be called with each WriteEntry that is created.
*/
onWriteEntry?: (entry: WriteEntry) => any;
onWriteEntry?: (entry: WriteEntry) => unknown;
/**
* When extracting or listing archives, this method will be called with
* each entry that is not excluded by a `filter`.
@@ -246,7 +246,7 @@ export interface TarOptions {
* Important when listing archives synchronously from a file, because there
* is otherwise no way to interact with the data!
*/
onReadEntry?: (entry: ReadEntry) => any;
onReadEntry?: (entry: ReadEntry) => unknown;
/**
* Pack the targets of symbolic links rather than the link itself.
*/
@@ -411,7 +411,7 @@ export interface TarOptions {
*
* @deprecated
*/
onentry?: (entry: ReadEntry) => any;
onentry?: (entry: ReadEntry) => unknown;
}
export type TarOptionsSync = TarOptions & {
sync: true;