From 990637d4e1e4819f29f3641b9b4376ef17df0468 Mon Sep 17 00:00:00 2001 From: tada5hi Date: Tue, 1 Sep 2026 14:10:39 +0200 Subject: [PATCH] types: match Header to what headers.decode() actually returns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three fields in the Header declaration disagree with the object decode() builds (headers.js:139-155): - type omits four values toType() can return — pax-header, pax-global-header, gnu-long-link-path, gnu-long-path — and is declared non-nullable although toType() returns null for any unrecognised typeflag (headers.js:186-201). - linkname is declared string, but decode() assigns null when byte 157 is zero (headers.js:104). - byteOffset is absent from the declaration, although decode() always sets it (headers.js:140) and extract.js:153 updates it per entry. --- index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index facde11..4cff196 100644 --- a/index.d.ts +++ b/index.d.ts @@ -20,13 +20,19 @@ interface Header { | 'character-device' | 'fifo' | 'contiguous-file' - linkname: string + | 'pax-header' + | 'pax-global-header' + | 'gnu-long-link-path' + | 'gnu-long-path' + | null + linkname: string | null uid: number gid: number uname: string gname: string devmajor: number devminor: number + byteOffset: number pax?: unknown | null }