Skip to content

Commit

Permalink
fix: add back the missing async iterator type
Browse files Browse the repository at this point in the history
  • Loading branch information
alvis committed Jul 21, 2023
1 parent a31c771 commit d0c7ef2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,25 @@ declare namespace tarstream {
filenameEncoding?: string
}

interface Source extends NodeJS.ReadableStream {
header: Header
offset: number
}

interface Extract extends NodeJS.WritableStream {
on(
event: 'entry',
callback: (
header: Header,
stream: NodeJS.ReadableStream,
stream: Source,
next: () => void
) => void
): void
on(event: 'close', callback: () => void)
on(event: 'finish', callback: () => void)
on(event: 'error', callback: (error: Error) => void)
destroy(error?: Error): void
[Symbol.asyncIterator](): AsyncIterableIterator<Source>
}

interface Module {
Expand Down

0 comments on commit d0c7ef2

Please sign in to comment.