jshttp / mime-db

Media Type Database
MIT License
1.09k stars 256 forks source link

TypeScript file extensions map to incorrect file types #259

Closed zsakowitz closed 2 years ago

zsakowitz commented 2 years ago

Currently, .ts maps to video/mp2t, .mts maps to model/vnd.mts, and .tsx and .cts aren't in the database.

TypeScript uses these extensions:

I think that modifying these would be helpful to the user base and fix issues with static file servers thinking TypeScript files are videos. It would also be nice if .ts could both be video/mp2t and text/typescript, but I'm not sure what the opinion is on that.

dougwilson commented 2 years ago

Hi @zsakowitz and thank you for your issue. This module only provides a list of mime types that has a property of extensions associated with that mime type. You can find the list of where the data is sourced from in the README and instructions for how to get a new mime type (and thus extensions) added. Please check out https://github.com/jshttp/mime-db#contributing