Skip to content

Commit 4743034

Browse files
authored
Merge pull request #3 from hey-api/fix/buffer-type
Fix/buffer type
2 parents c9f9b09 + 1754059 commit 4743034

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/index.ts

+1-1
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

+1-1
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),

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hey-api/json-schema-ref-parser",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Parse, Resolve, and Dereference JSON Schema $ref pointers",
55
"homepage": "https://heyapi.dev/",
66
"repository": {

0 commit comments

Comments
 (0)