Skip to content

Commit 9751a5b

Browse files
committed
Baseline accept
1 parent 351ccc9 commit 9751a5b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/baselines/reference/awaitedType.errors.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
tests/cases/compiler/awaitedType.ts(22,12): error TS2589: Type instantiation is excessively deep and possibly infinite.
22
tests/cases/compiler/awaitedType.ts(26,12): error TS2589: Type instantiation is excessively deep and possibly infinite.
3+
tests/cases/compiler/awaitedType.ts(234,3): error TS7062: A Promise must be awaited, returned, or explicitly ignored with the 'void' operator
34
tests/cases/compiler/awaitedType.ts(236,28): error TS2493: Tuple type '[number]' of length '1' has no element at index '1'.
45

56

6-
==== tests/cases/compiler/awaitedType.ts (3 errors) ====
7+
==== tests/cases/compiler/awaitedType.ts (4 errors) ====
78
type T1 = Awaited<number>;
89
type T2 = Awaited<Promise<number>>;
910
type T3 = Awaited<number | Promise<number>>;
@@ -242,11 +243,16 @@ tests/cases/compiler/awaitedType.ts(236,28): error TS2493: Tuple type '[number]'
242243
const promises = [Promise.resolve(0)] as const
243244

244245
Promise.all(promises).then((results) => {
246+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
245247
const first = results[0]
248+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
246249
const second = results[1] // error
250+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
247251
~
248252
!!! error TS2493: Tuple type '[number]' of length '1' has no element at index '1'.
249253
})
254+
~~~~
255+
!!! error TS7062: A Promise must be awaited, returned, or explicitly ignored with the 'void' operator
250256
}
251257

252258
// repro from #40330

0 commit comments

Comments
 (0)