From 66bf805e27382345b436a3262da490e35fea22c0 Mon Sep 17 00:00:00 2001 From: c0per <60544162+c0per@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:57:01 +0800 Subject: [PATCH] fix: return ParsedTarFileItem type after parsing --- src/parse.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parse.ts b/src/parse.ts index e716fe1..5387d6c 100644 --- a/src/parse.ts +++ b/src/parse.ts @@ -1,6 +1,6 @@ -import type { ParsedTarFileItem, TarFileItem } from "./types"; +import type { ParsedTarFileItem } from "./types"; -export function parseTar(data: ArrayBuffer | Uint8Array): TarFileItem[] { +export function parseTar(data: ArrayBuffer | Uint8Array): ParsedTarFileItem[] { const buffer = (data as Uint8Array).buffer || data; const files: ParsedTarFileItem[] = []; @@ -78,7 +78,7 @@ export function parseTar(data: ArrayBuffer | Uint8Array): TarFileItem[] { export async function parseTarGzip( data: ArrayBuffer | Uint8Array, opts: { compression?: CompressionFormat } = {}, -): Promise { +): Promise { const stream = new ReadableStream({ start(controller) { controller.enqueue(new Uint8Array(data));