We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Room.has(contact)
WARNING: This change will let us make more mistakes:
if (room.has(contact)) { console.error('here will always be executed because Promise === true') }
So we have to enable tslint to check the floating promise for us. So should all the developers do if you are using Wechaty:
Related configuration in tslint.json:
{ "extends": "tslint:recommended", "rules": { "no-floating-promises": true } }
const exist = room.has(contact)
const exist = await room.has(contact)
The text was updated successfully, but these errors were encountered:
use await room.has() instead of room.has()! (#1289)
await room.has()
room.has()
7edfae1
Have to think more about how to deal with the floating promise when a user forgets to await.
await
Sorry, something went wrong.
use tslint to check floating promise will solve this issue.
floating promise
No branches or pull requests
WARNING: This change will let us make more mistakes:
So we have to enable tslint to check the floating promise for us. So should all the developers do if you are using Wechaty:
Related configuration in tslint.json:
See Also
Before
After
The text was updated successfully, but these errors were encountered: