j-holub / Node-MPV

A NodeJs Module for MPV Player
https://www.npmjs.com/package/node-mpv
MIT License
116 stars 73 forks source link

TypeScript binding #80

Closed leonekmi closed 4 years ago

leonekmi commented 4 years ago

Closes #73

This type declaration contains full documentation based on comments in your original code.

j-holub commented 4 years ago

Hey there,

thanks for the hard work! I'm starting my full time job tomorrow so I still have some stuff to take care of today, but I'll try to look into it within the next days. Thank you very much : )

j-holub commented 4 years ago

In index.d.ts line 17 you wrote auto_restart?: true, I'm not super familiar with TypeScript, does that mean true is the default value or does that mean you can only use true for that and not false?

leonekmi commented 4 years ago

You're right, it's my fault, it should be boolean like the others.

j-holub commented 4 years ago

Sorry for the late reply, not used to this full time job thing yet. times for both loop() and loopPlaylist() has to be optional, I think that's times?, right? I can change it myself if you want to.

Other than that, I think this PR can be merged. Thanks a lot for the work, this is a really awesome addition to the project in my opinion.

leonekmi commented 4 years ago

I fixed declarations for loop and loopPlaylist, i didn't see the cycle property if parameter is not specified.

j-holub commented 4 years ago

It's in the readme but I agree, that it is easy to miss, I should probably rephrase that more clearly. If you do no pass any argument, it toggles between looping and not looping.