- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.1k
 
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Conditional TypesThe issue relates to conditional typesThe issue relates to conditional typesFix 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
Description
Bug Report
π Search Terms
extends
π Version & Regression Information
v4.5.4
β― Playground Link
Playground link with relevant code
π» Code
type S<X> = <T>() => T extends X ? 1 : '2'
type Foo = S<'s1'> 
type Foo2 = S<'s2'>
type Result1 = Foo extends Foo2 ? true : false 
type Result2 = S<'s1'> extends S<'s2'> ? true : falseπ Actual behavior
For the result2 expression, the only difference from result1 is that result1 uses the type rather than the specific S<'s1'> ,But they returned a completely different result. Result1 return true,Result2 return false
π Expected behavior
type Result1 and type Result2 should return false
ehmicky and jarpoolewhzx5byb
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Conditional TypesThe issue relates to conditional typesThe issue relates to conditional typesFix 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