Closed wawyed closed 1 year ago
Hey, thanks for filing an issue.
Could you please elaborate on what is the expected and actual behaviour? I'm having a hard time understanding what "comparing a function vs an array fails" means.
Hi, sorry the link didn't work. I've updated it and it should be more clear what the problem is. Let me know if you want me to clarify further.
There should never be a specific need to have exclusively a function or exclusively an array, since those are always mutually exclusive by default.
As a counter-example, try to assign both a function and an array to a variable (the way that your playground link shows). It's not something that is possible in JavaScript.
In such a use case the union operator (|
) is what one should use.
Hence, I don't see this as a bug. If I'm missing something, please let me know.
For some reason comparing a function vs an array fails :( Playground Link