openverse-frontend
openverse-frontend copied to clipboard
Convert the media type constants back from TS to JSDoc
Problem
We cannot use the media type constants in the scripts that are run by Nodejs without a build step, such as proxy.js in tests, or the locale generator scripts.
Description
We can convert the constants back to use JSDoc. This way they will be typed, but at the same time be valid JS that can be used from JS scripts.
Alternatives
Create a duplicate JS file - would be dangerous because it would drift away from one source of truth. Use hard-coded constants in the scripts - this may also result in incorrect constant values.
Additional context
Implementation
- [ ] 🙋 I would be interested in implementing this feature.