mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
14 lines
734 B
Plaintext
14 lines
734 B
Plaintext
castOfAwait.ts(5,32): error TS2352: Conversion of type 'undefined' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
|
|
|
|
|
|
==== castOfAwait.ts (1 errors) ====
|
|
async function f() {
|
|
<number> await 0;
|
|
typeof await 0;
|
|
void await 0;
|
|
await void <string> typeof <number> void await 0;
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2352: Conversion of type 'undefined' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
|
|
await await 0;
|
|
}
|
|
|