I wish Response extended Promise and fetch() returned a Response, so I could write: let data = await fetch(url).json(); instead of: let data = await (await fetch(url)).json();
-
-
Replying to @justinfagnani
import a pointfree json from lib await fetch(url).then(json)
1 reply 0 retweets 1 like -
Replying to @PowersBenny @justinfagnani
We didn't have Promise subclassing done when we needed to design Response = (
1 reply 0 retweets 1 like -
async functions never return subclasses so its of limited utility anyway.
1 reply 0 retweets 0 likes
...and that wasn't decided at the time either.
11:18 AM - 13 Aug 2019
0 replies
0 retweets
0 likes
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.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.