From 40c8f465b3344c2c3c82607d62fa3335c67069f1 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Wed, 29 May 2024 15:33:48 -0700 Subject: [PATCH] Fix baselines after PR 58621 --- .../reference/asyncYieldStarContextualType.types | 16 ++++++++-------- .../reference/yieldStarContextualType.types | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/baselines/reference/asyncYieldStarContextualType.types b/tests/baselines/reference/asyncYieldStarContextualType.types index 0a340b75589ad..55377518eb3e0 100644 --- a/tests/baselines/reference/asyncYieldStarContextualType.types +++ b/tests/baselines/reference/asyncYieldStarContextualType.types @@ -66,13 +66,13 @@ async function* f(): AsyncGenerator<"NOT_FOUND_AUTHOR" | "NOT_FOUND_BOOK", BookW >authorPromise.then(mapper) : Promise> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >authorPromise.then : , TResult2 = never>(onfulfilled?: (value: Result) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^ ^^^^ ^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^^^^ >authorPromise : Promise> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >then : , TResult2 = never>(onfulfilled?: (value: Result) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^ ^^^^ ^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^^^^ >mapper : (result: Result) => Result -> : ^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^^^^ // With yield*, the type of test2 is // Author | BookWithAuthor @@ -87,13 +87,13 @@ async function* f(): AsyncGenerator<"NOT_FOUND_AUTHOR" | "NOT_FOUND_BOOK", BookW >authorPromise.then(mapper) : Promise> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >authorPromise.then : , TResult2 = never>(onfulfilled?: (value: Result) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^ ^^^^ ^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^^^^ >authorPromise : Promise> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >then : , TResult2 = never>(onfulfilled?: (value: Result) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^ ^^^^ ^^ ^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^^ ^^^^^^^^ >mapper : (result: Result) => Result -> : ^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^^^^ const x1 = yield* g(); >x1 : unknown @@ -103,7 +103,7 @@ async function* f(): AsyncGenerator<"NOT_FOUND_AUTHOR" | "NOT_FOUND_BOOK", BookW >g() : AsyncGenerator<"NOT_FOUND_AUTHOR" | "NOT_FOUND_BOOK", unknown, unknown> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >g : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^^^^^^ const x2: number = yield* g(); >x2 : number @@ -113,7 +113,7 @@ async function* f(): AsyncGenerator<"NOT_FOUND_AUTHOR" | "NOT_FOUND_BOOK", BookW >g() : AsyncGenerator<"NOT_FOUND_AUTHOR" | "NOT_FOUND_BOOK", number, unknown> > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >g : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^^^^^^ return null! as BookWithAuthor; >null! as BookWithAuthor : BookWithAuthor diff --git a/tests/baselines/reference/yieldStarContextualType.types b/tests/baselines/reference/yieldStarContextualType.types index 08f89242fda8c..a3996cf7981ef 100644 --- a/tests/baselines/reference/yieldStarContextualType.types +++ b/tests/baselines/reference/yieldStarContextualType.types @@ -17,7 +17,7 @@ function* f(): Generator { >g() : Generator > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >g : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^^^^^^ const x2: number = yield* g(); >x2 : number @@ -27,5 +27,5 @@ function* f(): Generator { >g() : Generator > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >g : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^^^^^^ }