-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array.isArray refinement loses the array's type #33700
Comments
There simply is no type-information available in the You can easily workaround this by providing your own version with more specific types, so there's type information available for the compiler, for example:
|
Exact duplicate of #32497, which was locked due to violations of the code of conduct. Let's please remember that disagreements should be handled constructively and respectfully. |
What is the difference between this and #17002? |
Just to reiterate, the last thing we need is brow-beating about how THIS IS A BUG and YOU ARE SCREWING UP. We're trying to make a good product and we want the right things to happen; just 💩ing on our efforts doesn't make us more likely to take your issue seriously. |
@RyanCavanaugh They're very similar. #17002 only mentions Well, just |
I realize there are a number of related issues. However, some where about ReadonlyArray, some didn't see directly related at all even though it was pointed there.
Also, this is a much smaller example, just a single line of code really:
Playground link
I know people will point to this ir that implementation or design decision detail — honestly guys, you got it REVERSED. The tool should serve the purpose, not the other way around!
That the array loses all it's type information in such a simple example is A BUG.
And it is possible to do much better: See here! I'm only pointing this out because at times the responses sound like "We tried everything but it is just not possible" when the competition shows that it is actually quite possible.
Related(?): #17002
The text was updated successfully, but these errors were encountered: