-
Notifications
You must be signed in to change notification settings - Fork 13.4k
true extends false #28654
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Indexed Access TypesThe issue relates to accessing subtypes via index accessThe issue relates to accessing subtypes via index accessFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Indexed Access TypesThe issue relates to accessing subtypes via index accessThe issue relates to accessing subtypes via index accessFixedA PR has been merged for this issueA PR has been merged for this issue
TypeScript Version: 3.2.0-dev.20181117
EDIT: I just tested with TS 3.2.0-rc and it has this bug
Search Terms: true extends false
Code
I feel like I'm losing my mind here. Or maybe I'm tired because it's 3.34am. Maybe I need to take a break. Am I missing something obvious?
Expected behavior:
gto be of type"Expected".Intuitively,
DataTis of type{ b : false }DataT["b"]is of typefalsetrue extends falseshould be...falseActual behavior:
gis of type["Actual", "true extends", false]Playground Link: Here
EDIT: I just tested and this is not a problem in TS 3.0.1
I'm not crazy, phew.