Confirmed working with TypeScript 3.1.1. Once installed, you can target that TypeScript version via @code - which then gives you the '
Convert to async function' tooltip next to your Promise related functionspic.twitter.com/UswmrIlMba
U tweetove putem weba ili aplikacija drugih proizvođača možete dodati podatke o lokaciji, kao što su grad ili točna lokacija. Povijest lokacija tweetova uvijek možete izbrisati. Saznajte više
Confirmed working with TypeScript 3.1.1. Once installed, you can target that TypeScript version via @code - which then gives you the '
Convert to async function' tooltip next to your Promise related functionspic.twitter.com/UswmrIlMba
Isn't that conversion in the screenshot wrong though? Seems like line 7 should be `throw 3` (not `return Promise.reject(3)`) so the `catch`-clause is reached, like in the original
Can't reproduce as I can't get it to work with code@1.27.2-1 (arch) and typescript@3.1.1pic.twitter.com/fSqaFGJwHe
Yeah hadn't realised at first, looks like the two versions are slightly different!https://twitter.com/umaar/status/1045715715632889856 …
What about the other way around? I find promise chains way more appealing than async/await 
Ohh curious, how come you prefer promise chains over async/await?
shouldn't both those examples have `return await` instead of `return`? Or am I understanding async fns wrong? (e.g. the first one should log 3 and resolve undefined, but instead rejects 3)
(that said, woah. This is going to change my life)
True there does seem to be a small difference with how errors are handled in that particular gif, but re: the `return await` thing, you can safely transform return await fetch() into this: return fetch() See https://eslint.org/docs/rules/no-return-await … !
This is rad! Any chance we could add this to http://vscodecandothat.com ?
An excellent resource
nice work, yeah please add it!
How do you enable this feature?
If @code is configured to use the latest @typescriptlang - it should work!https://twitter.com/umaar/status/1045656569076224001 …
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.