Skip to content

Commit f2f2cab

Browse files
committed
DUMPER-COMPANION: Fix imports and prepare for next version
Type the onProgress callback to avoid future bogus type inference.
1 parent ef5c742 commit f2f2cab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dumper-companion/src/Dumper.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, ComponentChild } from 'preact';
2-
import { fs } from '@zip.js/zip.js/lib/zip-fs.js';
2+
import { fs } from '@zip.js/zip.js';
33
import { Volume } from './hfs/main';
44
import { Language, getLanguages } from './encoding';
55

@@ -152,7 +152,7 @@ export default class Dumper extends Component<Props, State> {
152152
volume.dumpToZip(zipFS.root, this.state.lang, !this.state.unicode, this.state.forceMacBinary, this.log.bind(this));
153153
const blob = await zipFS.exportBlob({
154154
level: 0,
155-
onprogress: (index, max) => {
155+
onprogress: (index: number, max: number): undefined => {
156156
const percent = Math.floor(index / max * 100);
157157
this.updateDumpPercent(percent);
158158
}

dumper-companion/src/hfs/directory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { computeCRC } from '../crc';
3131
import { Language, encodeFileName } from '../encoding';
3232
import struct from '../struct';
3333
import { bytes, bytesToString, joinBytes } from '../util';
34-
import type { ZipDirectoryEntry } from '@zip.js/zip.js/lib/zip-fs.js';
34+
import type { ZipDirectoryEntry } from '@zip.js/zip.js';
3535

3636

3737
export type FileOrFolder = MacFile | AbstractFolder;

0 commit comments

Comments
 (0)