Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by scherlock

6 days ago

Is it really good form in TypeScript to make all functions async, even when functions don't use await? like this, https://github.com/cloudflare/workers-oauth-provider/blob/fe...

2 comments

scherlock

Reply

kentonv  6 days ago

env.OAUTH_KV.get(...) is reading from Workers KV storage. It returns a promise.

ccorcos  6 days ago

No. It’s possible env[?].get returns a promise though

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities