frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Automatically add missing "async/await" keywords to your TypeScript code

https://github.com/stanNthe5/typescript-autoawait
7•theThree•1y ago

Comments

bastawhiz•1y ago
Is this a problem that people actually have?
xeromal•1y ago
Fun side project man!
primitivesuave•1y ago
I took a peek at the implementation - I think this only works for a case where the typing explicitly contains the string "Promise". For example, I don't think it would work if I use `SomeInterface["some_promise_key"]` or might incorrectly add an async if I use `Awaited<Promise<...>>`.

I think what you're trying to build might be best served by Typescript's VFS - https://www.npmjs.com/package/@typescript/vfs. You can load the local files into an in-memory type system, and quickly extract async/await hints that might be more useful for a typical TS developer. I think there's a lot of really interesting static analysis you could do to improve async/await safety, as it certainly leads to issues from time to time.

joshstrange•1y ago
I do not want to be mean but I think you'd be much better served with ESLint rules to yell at you when you don't await when you should or do when you shouldn't.

This should _not_ be an automatic operation since it can change behavior in ways that will be unclear to the developer (completely undoing any gain from them being added automatically).

theThree•1y ago
You can still control it by adding "//no-await". In fact, the "//no-await" makes me feel more clear.
nextweek2•1y ago
I created a ticket, using comments is not necessary because there is already the `void` syntax for when you don't want to wait:

https://github.com/stanNthe5/typescript-autoawait/issues/1

nextweek2•1y ago
It should be noted that there is already a lint rule for this: https://typescript-eslint.io/rules/no-floating-promises/

3-legged Persian leopard's 150-mile journey highlights Caucasus border hazards

https://news.mongabay.com/short-article/2026/11/three-legged-persian-leopards-150-mile-journey-hi...
1•rguiscard•1m ago•0 comments

Valuing Written Material

https://a.drien.com/posts/ai-writing/
1•macNchz•1m ago•0 comments

AppLovin among firms in talks to acquire Criteo

https://www.reuters.com/legal/transactional/applovin-among-firms-talks-acquire-criteo-sources-say...
2•mfiguiere•2m ago•0 comments

The Silicon Valley Brawl over a 39-Story Tower in a Leafy Suburban Neighborhood

https://www.wsj.com/real-estate/the-silicon-valley-brawl-over-a-39-story-tower-in-a-leafy-suburba...
1•JumpCrisscross•2m ago•0 comments

Peek: The Universal Parcel Tracker

https://peektracker.com/home
1•Velocifyer•5m ago•0 comments

Ofqual urges 'life-altering' penalties for students who use tech to cheat

https://www.theguardian.com/education/2026/nov/18/ofqual-urges-life-altering-penalties-for-studen...
1•nephihaha•7m ago•0 comments

Unparalleled Misalignments

https://rickiheicklen.com/unparalleled-misalignments.html
1•thcipriani•9m ago•1 comments

Crimean Bridge partly collapses as Zelensky hails unprecedented attack

https://www.bbc.com/news/articles/cw772jk4rvmxo
6•onemoresoop•11m ago•0 comments

WhatsApp is rolling out a new cloud backup storage on Android

https://wabetainfo.com/whatsapp-is-rolling-out-a-new-cloud-backup-storage-on-android/
1•thunderbong•12m ago•0 comments

Are We All Going Bots**T Crazy?

https://blog.discourse.org/2026/11/are-we-all-going-bots-t-crazy/
3•joanwestenberg•16m ago•2 comments

List of aviation shootdowns and accidents during the 2026 Iran war

https://en.wikipedia.org/wiki/List_of_aviation_shootdowns_and_accidents_during_the_2026_Iran_war
1•DASD•19m ago•0 comments

Self-Adapting Language Models

https://jyopari.github.io/posts/seal
1•jonbaer•19m ago•0 comments

Google's AI answers reducing search traffic by 40%

https://revscope.co/blog/search-seo-geo-2026/
3•slashdev•22m ago•0 comments

No plans to reinstate CEO Jensen Huang, Nvidia chair tells investors

https://www.cbc.ca/news/business/nvidia-earnings-jensen-huang-9.7425620
5•uladzislau•24m ago•0 comments

iOS 27.3's redesigned Apple Health app requires newer iPhone model

https://9to5mac.com/2026/11/17/ios-27-3s-redesigned-apple-health-app-requires-newer-iphone-model/
2•bochoh•24m ago•0 comments

Waymo pauses US freeway operations of its self-driving cars after California ban

https://www.cnn.com/2026/11/17/us/california-waymo-ban-freeways
2•canucker2016•24m ago•0 comments

Build-a-Pal – Offline robot kids teach by voice and gesture

https://www.indiegogo.com/en/projects/ghassen/build-a-pal
6•xifodl•31m ago•0 comments

Calif discloses Java4Shell flaw in OpenJDK's Base64 decoder

https://runtimewire.com/article/calif-discloses-java4shell-flaw-in-openjdk-s-base64-decoder
1•birdculture•32m ago•0 comments

Dynamic Any-Casting in C++

https://nicbn.com/posts/dynamic_any_cast_cxx/
1•nicbn•32m ago•0 comments

Nvidia earnings beat estimates; attention turns to call

https://www.reuters.com/business/view-nvidia-earnings-beat-estimates-attention-turns-call-2026-11...
3•wslh•34m ago•0 comments

Stripe backer Atomico calls for Europe to own its success stories

https://techcrunch.com/2026/11/17/stripe-backer-atomico-calls-for-europe-to-own-its-success-stories/
1•doener•35m ago•0 comments

The geometry of morphospaces: lessons from the classic Raup shell coiling model [pdf]

https://onlinelibrary.wiley.com/doi/10.1111/brv.12276
1•thunderbong•36m ago•0 comments

Voyager 1's 'light-day' milestone has been a half-century in the making

https://www.scientificamerican.com/article/voyager-1-approaches-a-light-day-milestone/
1•divbzero•36m ago•0 comments

U.N. Starts Uncertain Effort to Regulate Lethal Autonomous Weapons

https://www.nytimes.com/2026/11/16/world/europe/un-killer-robots-autonomous-weapons.html
1•bookofjoe•36m ago•1 comments

Vivaldi Social: Mastodon server hosted in Iceland by the makers of Vivaldi

https://social.vivaldi.net/about
1•doener•37m ago•0 comments

An open letter to OpenAI and Anthropic on cybersecurity access

https://openletter.earth/stop-blocking-defenders-an-open-letter-to-openai-and-anthropic-on-cybers...
4•wslh•39m ago•1 comments

My Dog Ate a Ketchup Packet – What to Do Now – PetToxCheck

https://pettoxcheck.com/dogs/my-dog-ate-ketchup-packet/
1•iris_blackwood•40m ago•0 comments

Show HN: A more readable take on HN

https://hn.orbitalchicken.com
1•y1n0•42m ago•1 comments

Show HN: Dropbox for AI Skill Files

https://www.mdkit.ai
1•tannerjames711•43m ago•0 comments

Show HN: Shard – Distributed AI Inference Across Multiple Computers

https://github.com/avelone123123/shard
2•avelone•44m ago•1 comments