Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mimeTypes TypeScript type #464

Merged
merged 2 commits into from Jul 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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