Skip to content

Commit 25ba4b3

Browse files
committed
fix: do not use buffer type as generic
1 parent c9f9b09 commit 25ba4b3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { fileResolver } from "./resolvers/file.js";
1313

1414
interface ResolvedInput {
1515
path: string;
16-
schema: string | JSONSchema | Buffer<ArrayBufferLike> | Awaited<JSONSchema> | undefined;
16+
schema: string | JSONSchema | Buffer | Awaited<JSONSchema> | undefined;
1717
type: 'file' | 'json' | 'url';
1818
}
1919

lib/parsers/binary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const BINARY_REGEXP = /\.(jpeg|jpg|gif|png|bmp|ico)$/i;
55

66
export const binaryParser: Plugin = {
77
canHandle: (file: FileInfo) => Buffer.isBuffer(file.data) && BINARY_REGEXP.test(file.url),
8-
handler: (file: FileInfo): Buffer<ArrayBufferLike> => Buffer.isBuffer(file.data)
8+
handler: (file: FileInfo): Buffer => Buffer.isBuffer(file.data)
99
? file.data
1010
// This will reject if data is anything other than a string or typed array
1111
: Buffer.from(file.data),

0 commit comments

Comments
 (0)