Browse Source

Fixed a typing error

master
Cédric Belin 6 months ago
parent
commit
ce6e47c2ba
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/checker.ts

+ 1
- 1
src/checker.ts View File

@@ -87,7 +87,7 @@ export class Checker extends Transform {
if (file.isNull()) throw new Error('Empty manifest.');
if (file.isStream()) throw new Error('Streams are not supported.');

const manifest = JSON.parse(file.contents!.toString(encoding));
const manifest = JSON.parse(file.contents!.toString(encoding as BufferEncoding));
if (!manifest || typeof manifest != 'object') throw new SyntaxError('Invalid manifest format.');
return manifest as Record<string, any>;
}


Loading…
Cancel
Save