Accept baseline changes

This commit is contained in:
Anders Hejlsberg 2023-10-18 07:07:26 -07:00
parent bdfd342aaa
commit a1047daf8b
3 changed files with 15 additions and 9 deletions

View File

@ -1,3 +1,5 @@
//// [tests/cases/compiler/genericSignatureRelations.ts] ////
//// [genericSignatureRelations.ts]
// Repro from #48070
@ -16,8 +18,8 @@ type Result2 = S<'s1'> extends S<'s2'> ? true : false;
//// [genericSignatureRelations.d.ts]
declare type S<X> = <T>() => T extends X ? 1 : '2';
declare type Foo1 = S<'s1'>;
declare type Foo2 = S<'s2'>;
declare type Result1 = Foo1 extends Foo2 ? true : false;
declare type Result2 = S<'s1'> extends S<'s2'> ? true : false;
type S<X> = <T>() => T extends X ? 1 : '2';
type Foo1 = S<'s1'>;
type Foo2 = S<'s2'>;
type Result1 = Foo1 extends Foo2 ? true : false;
type Result2 = S<'s1'> extends S<'s2'> ? true : false;

View File

@ -1,4 +1,6 @@
=== tests/cases/compiler/genericSignatureRelations.ts ===
//// [tests/cases/compiler/genericSignatureRelations.ts] ////
=== genericSignatureRelations.ts ===
// Repro from #48070
type S<X> = <T>() => T extends X ? 1 : '2';

View File

@ -1,14 +1,16 @@
=== tests/cases/compiler/genericSignatureRelations.ts ===
//// [tests/cases/compiler/genericSignatureRelations.ts] ////
=== genericSignatureRelations.ts ===
// Repro from #48070
type S<X> = <T>() => T extends X ? 1 : '2';
>S : S<X>
type Foo1 = S<'s1'>;
>Foo1 : Foo1
>Foo1 : <T>() => T extends "s1" ? 1 : "2"
type Foo2 = S<'s2'>;
>Foo2 : Foo2
>Foo2 : <T>() => T extends "s2" ? 1 : "2"
type Result1 = Foo1 extends Foo2 ? true : false;
>Result1 : false