You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tinganho opened this issue
Dec 31, 2015
· 2 comments
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadCanonicalThis issue contains a lengthy and complete description of a particular problem, solution, or design
You don't want to narrow from any to Object because now you can effectively do nothing with your value. So in general, we don't narrow with instanceof type guards. See #1426 for why.
User-defined type guards need to exhibit the same behavior (because they might internally use an instanceof guard); however, we are considering narrowing from any for primitives, regardless of the type guard you use. See #5930 and #6015.
DanielRosenwasser
added
By Design
Deprecated - use "Working as Intended" or "Design Limitation" instead
Question
An issue which isn't directly actionable in code
Canonical
This issue contains a lengthy and complete description of a particular problem, solution, or design
and removed
Question
An issue which isn't directly actionable in code
labels
Dec 31, 2015
DanielRosenwasser
changed the title
Inconsistence narrowing of union consisting of any type
Inconsistence narrowing of 'any' type
Dec 31, 2015
DanielRosenwasser
changed the title
Inconsistence narrowing of 'any' type
Inconsistent narrowing of 'any' type
Dec 31, 2015
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadCanonicalThis issue contains a lengthy and complete description of a particular problem, solution, or design
Only the
typeof
query will narrow to anon-any
type above.The text was updated successfully, but these errors were encountered: