Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Understanding no-floating-promises#8046
Closed
GZLiew started this conversation inTechnical Discussions
-
BodyHi I added the '@typescript-eslint/no-floating-promises': 'error', exportconstsleep=(ms=3000)=>newPromise((resolve)=>setTimeout(resolve,ms));consta=sleep(); but calling only sleep() errors sleep();// Promises must be awaited Additional InfoNo response Before you submit your discussion, please confirm the following. If any of these required steps are not taken, we may not be able to review your RFC. Help us to help you!
|
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 2 comments
-
The rule assumes your variable will be used and handled appropriately. |
BetaWas this translation helpful?Give feedback.
All reactions
0 replies
-
Looks like this was a straightforward resolution 🙂. Thanks all! Filed#8088 to improve docs around this. |
BetaWas this translation helpful?Give feedback.
All reactions
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment