Zod- / jsVideoUrlParser

A javascript parser to extract informations like provider, channel, id, start time from YouTube, Vimeo, Dailymotion, Twitch,... urls
MIT License
235 stars 73 forks source link

Add type declarations #65

Closed claabs closed 4 years ago

claabs commented 4 years ago

Closes #55

I may have gone a little overkill and typed pretty much every function file except util.js. I probably only needed to type the VideoInfo types for each provider.

Either I can trim it down, or leave the complete types to assist in a potential future Typescript rewrite. The only real impact it has is on file size, and ease of maintenance when adding new providers. Let me know what you think.

claabs commented 4 years ago

I ended up removing the extra types to reduce the overhead when maintainers add new providers.

If you ever do get the urge to migrate completely to Typescript, I made a branch containing the extra types (https://github.com/claabs/jsVideoUrlParser/tree/complete-types) that may assist with the effort.