Alex Bruns
Alex Bruns
Hey, I just wanted to add my support for this. It would make a major difference in my project.
Surprised this doesn't have types yet. Has the author indicated they don't want other's to supply types? If not, I'd be happy to add types to Definitely Typed on this...
There are a few things I'd change, for example, the static intersection should require at least 2 set arguments, and the instance intersection should require at least 1 set argument....
Actually looking at the implementation, there's a quite a few optimizations that could be made. I may just write something myself. I'd still be happy to help with reviewing typings,...
Also, the implementation for difference does require at least 1 set. It will encounter a runtime error if you give it 0 sets.
It handles 1 by just returning the empty set though.
So, we just can't use this with a regular date input without writing a custom guard? ```js const date = countLeadingZeroes(dateString.split("-")[2] ?? "0000")) === 0 ? dayjs(dateString) : null ```...
> Oh, okay. Do you want to use it for your client or within the studio? If it is for clients you probably want to have types for _queries_, not...
Worked like a charm! Thank you. Also, just out of curiosity, is this documented somewhere? If not, I'd highly recommend adding a note about it since it's a very common...
Having this problem on as well. Using the work around for the time being. Just wanted to add my laptop's specs to help with finding a pattern for debugging: