Would you be interested in a TypeScript version
onigoetz opened this issue · 2 comments
Hi,
I needed to experiment with a new feature (the ability to block specific days, not just a start and end date).
While doing this I converted the whole codebase to TypeScript.
I can make a PR with the changes if you're interested ?
Hello @onigoetz! Thanks for your interested in Dayzed.
In regards to TypeScript, I have thought about converting this project to use it but haven't completely felt the need at this point since we added type definitions to the the project not too long ago. And since I currently don't work with TypeScript often I think it would take me a while to get up to speed and feel confident in going over a PR written in TypeScript. So I think I will currently pass on the offer at this time. Thank you very much for being willing to contribute!
But in regards to the new feature for blocking specific days, You can technically implement this functionality outside Dayzed, and I think I prefer it that way as it gives whoever is implementing the lib more options for their use case.
Here's a quick example of disabling certain days of the week in this codesandbox on line 90.
I am going to close this issue for now, but if there are any more questions or thoughts please feel free to reopen. Thanks!
Indeed, it's obvious now that you show the example but I didn't think to implement it this way :P
Sure no problem I understand, yes I confirm the typings work well :)