You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfoo: Promise<Promise<number>>=Promise.resolve<Promise<number>>(Promise.resolve(666))// ^^^^^^^^^^^^^^^ type argumentfoo.then((x: Promise<number>)=>console.log(typeofx))// ^^^^^^^^^^^^^^^^^ thats actually wrong type for 'x', 'x' is actually a 'number'
π Actual behavior
Output: "number"
This is wrong because x annotated as Promise<number> and it typechecks.