-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Promise<Promise<T>> cannot exist in JS #27711
Copy link
Copy link
Labels
Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Metadata
Metadata
Assignees
Labels
Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
TypeScript Version: Version 3.2.0-dev.20181011
Search Terms:
is:open label:Bug promise
label:Bug wrapped promise
label:Bug wrapped nested
Code
Expected behavior:
Compilation should fail, because
p1is actually aPromise<number>due to promise unwrapping.Actual behavior:
Compilation should fail, requiring code which looks like:
Playground Link:
Runtime error
No runtime error
Related Issues:
Didn't find related issue