-
Notifications
You must be signed in to change notification settings - Fork 13.4k
No error on unconstrained type parameter in > comparison #50603
Copy link
Copy link
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: check: Control FlowThe issue relates to control flow analysisThe issue relates to control flow analysisFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: check: Control FlowThe issue relates to control flow analysisThe issue relates to control flow analysisFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug Report
🔎 Search Terms
object is possibly undefined 4.8
🕗 Version & Regression Information
⏯ Playground Link
TS playground on 4.8.0-beta link.
(The playground doesn't seem to have 4.8.x releases, but I tested on 4.8.0-beta and nightly (4.9.0-dev.XXXXXXX).)
💻 Code
On that line, hovering over the first
resultshowsT | null. Hovering over the secondresultshowsT & ({} | undefined).🙁 Actual behavior
I get a type error.
🙂 Expected behavior
No error.