From 2fc975ac4a401e84cbfc715bdbe4c9cefd7dea97 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 20 Dec 2023 10:19:53 -1000 Subject: [PATCH] Update tests --- tests/baselines/reference/noInfer.errors.txt | 2 +- tests/baselines/reference/noInfer.js | 2 +- tests/baselines/reference/noInfer.symbols | 2 +- tests/baselines/reference/noInfer.types | 4 ++-- .../types/typeRelationships/typeInference/noInfer.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/baselines/reference/noInfer.errors.txt b/tests/baselines/reference/noInfer.errors.txt index acf06ca1f0325..2b016511a09b2 100644 --- a/tests/baselines/reference/noInfer.errors.txt +++ b/tests/baselines/reference/noInfer.errors.txt @@ -34,7 +34,7 @@ noInfer.ts(66,14): error TS2345: Argument of type '{}' is not assignable to para type T21 = NoInfer & string>; type T22 = NoInfer & string[]>; - // NoInfer is erased in index types and mapped types + // keyof NoInfer is transformed into NoInfer type T30 = keyof NoInfer<{ a: string, b: string }>; type T31 = keyof NoInfer; diff --git a/tests/baselines/reference/noInfer.js b/tests/baselines/reference/noInfer.js index a090dbdebcf64..59e27f3755efd 100644 --- a/tests/baselines/reference/noInfer.js +++ b/tests/baselines/reference/noInfer.js @@ -22,7 +22,7 @@ type T20 = NoInfer>; type T21 = NoInfer & string>; type T22 = NoInfer & string[]>; -// NoInfer is erased in index types and mapped types +// keyof NoInfer is transformed into NoInfer type T30 = keyof NoInfer<{ a: string, b: string }>; type T31 = keyof NoInfer; diff --git a/tests/baselines/reference/noInfer.symbols b/tests/baselines/reference/noInfer.symbols index 1fcb74a3249f2..7a36c6fccb9a1 100644 --- a/tests/baselines/reference/noInfer.symbols +++ b/tests/baselines/reference/noInfer.symbols @@ -65,7 +65,7 @@ type T22 = NoInfer & string[]>; >NoInfer : Symbol(NoInfer, Decl(lib.es5.d.ts, --, --)) >T : Symbol(T, Decl(noInfer.ts, 19, 9)) -// NoInfer is erased in index types and mapped types +// keyof NoInfer is transformed into NoInfer type T30 = keyof NoInfer<{ a: string, b: string }>; >T30 : Symbol(T30, Decl(noInfer.ts, 19, 45)) diff --git a/tests/baselines/reference/noInfer.types b/tests/baselines/reference/noInfer.types index 5a2630f08075c..0b747c064a450 100644 --- a/tests/baselines/reference/noInfer.types +++ b/tests/baselines/reference/noInfer.types @@ -44,7 +44,7 @@ type T21 = NoInfer & string>; type T22 = NoInfer & string[]>; >T22 : NoInfer & string[]> -// NoInfer is erased in index types and mapped types +// keyof NoInfer is transformed into NoInfer type T30 = keyof NoInfer<{ a: string, b: string }>; >T30 : "a" | "b" @@ -52,7 +52,7 @@ type T30 = keyof NoInfer<{ a: string, b: string }>; >b : string type T31 = keyof NoInfer; ->T31 : keyof T +>T31 : NoInfer type T32 = { [K in keyof NoInfer<{ a: string, b: string }>]: K }; >T32 : { a: "a"; b: "b"; } diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts b/tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts index 57e229620de25..49b3dd087a10b 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/noInfer.ts @@ -22,7 +22,7 @@ type T20 = NoInfer>; type T21 = NoInfer & string>; type T22 = NoInfer & string[]>; -// NoInfer is erased in index types and mapped types +// keyof NoInfer is transformed into NoInfer type T30 = keyof NoInfer<{ a: string, b: string }>; type T31 = keyof NoInfer;