Skip to content

Commit

Permalink
Fix mimeTypes TypeScript type (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
charsleysa committed Jul 10, 2021
1 parent 92f3f50 commit 0012c56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core.d.ts
Expand Up @@ -353,7 +353,7 @@ declare namespace core {
/**
Supported MIME types.
*/
const mimeTypes: readonly core.MimeType[];
const mimeTypes: Set<core.MimeType>;

/**
Detect the file type of a readable stream.
Expand Down
2 changes: 1 addition & 1 deletion index.test-d.ts
Expand Up @@ -41,7 +41,7 @@ expectType<Promise<FileTypeResult | undefined>>(FileType.fromBuffer(new ArrayBuf

expectType<Set<FileType.FileExtension>>(FileType.extensions);

expectType<readonly FileType.MimeType[]>(FileType.mimeTypes);
expectType<Set<FileType.MimeType>>(FileType.mimeTypes);

const readableStream = fs.createReadStream('file.png');
const streamWithFileType = FileType.stream(readableStream);
Expand Down

0 comments on commit 0012c56

Please sign in to comment.