I'm using a lot of async / await in my JavaScript at the moment. In general I like it, BUT the #1 annoyance is that I quite often forget to await a promise and end up with hard-to-find bugs. With .then() this is never an issue, since it doesn't pretend to be synchronous.
-
-
Replying to @michlbrmly
Agree. Floating promises can be pretty hard to debug. With
#typescript we can find these kind of bugs with static analysis :-> https://palantir.github.io/tslint/rules/no-floating-promises/ …1 reply 0 retweets 1 like -
Replying to @krzKaczor
I am using TypeScript & tslint actually, so I just enabled that rule. Unfortunately it requires type checking so getting my IDE (
@WebStormIDE) to display it seems a bit tricky. But running in the CLI already revealed a couple of potential bugs!
3 replies 0 retweets 1 like -
Replying to @michlbrmly @WebStormIDE
You might take a look at that: https://github.com/krzkaczor/TypeStrict … it gathers even more useful rules :) I am writing blogpost about it right now :D also there is this project https://github.com/angelozerr/tslint-language-service … which can put tslint errors directly to ts lang services.
1 reply 0 retweets 1 like -
Replying to @krzKaczor @WebStormIDE
Yes I saw that project, which is why I said "a bit tricky" i.e. doesn't just work out of the box. There is already an issue for it: https://youtrack.jetbrains.com/issue/WEB-22778 , in which someone suggests using tslint-language-service, so I guess it will work in WebStorm.
1 reply 0 retweets 1 like -
Got it working!






1 reply 0 retweets 1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
