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/

The Sovereign – a research lab that never stops

https://github.com/cpldxx/the-sovereign
1•jisangwon1012•56s ago•0 comments

VistaPrint applies generative AI edits to prints without consent or warning

https://bsky.app/profile/mostlybree.kitrocha.com/post/3n2vxgsvrhs2q
1•thereader12•3m ago•1 comments

You Can Use Your Old Laptop to Block Ads on Every Device in Your House

https://www.bgr.com/2322247/how-to-use-your-old-laptop-block-ads-every-device/
1•nephihaha•5m ago•0 comments

Yann LeCun correcting the record on Jensen Huang

https://twitter.com/AlexTensor/status/2124373947864989881
1•MrBuddyCasino•6m ago•0 comments

Artex can now control a C2 and get ADMIN/SYSTEM access in minutes

https://medium.com/@nukeratframework/artex-can-now-control-a-c2-and-get-admin-system-access-in-mi...
1•JohnTheTitor•8m ago•0 comments

Why did 7-Eleven fail in India

https://finshots.in/archive/why-did-7-eleven-fail-in-a-country-obsessed-with-convenience/
2•vismit2000•9m ago•0 comments

Harness-Zero: Harness Distillation via Agent-as-Harness

https://arxiv.org/abs/2609.24974
1•echion•12m ago•1 comments

It Will Never: confident predictions and verdicts about AI [video]

https://www.youtube.com/watch?v=_Zzv15cwG1A
2•rib3ye•14m ago•0 comments

An effort to circumvent the Electoral College may be within reach

https://www.npr.org/2026/11/21/nx-s1-6044237/electoral-college-national-popular-vote-interstate-c...
2•andsoitis•15m ago•1 comments

Site uses circadian lighting, next big thing interfaces

https://estrella.pe/
1•ray_•15m ago•0 comments

No SPEAKER: sound and music from your Mac's trackpad

https://github.com/os6/nospeaker
1•putlake•16m ago•0 comments

Legit Reptilian behind NYC Mayor Mamdani at Press Conference 11/21/26

https://www.reddit.com/r/HighStrangeness/comments/1y26ptc/legit_reptilian_behind_nyc_mayor_mamdan...
1•tardismechanic•16m ago•0 comments

Advanced Character Physics (2001) [pdf]

https://www.cs.cmu.edu/afs/cs/academic/class/15462-s13/www/lec_slides/Jakobsen.pdf
2•tomatofu•16m ago•0 comments

Show HN: Dere Type Quiz – a free 2-minute dere test

https://deretypesquiz.com/
1•Game_Observer•17m ago•0 comments

James "Kibo" Parry

https://en.wikipedia.org/wiki/James_%22Kibo%22_Parry
2•guerrilla•21m ago•0 comments

Hierarchical Bayesian Neural Networks: When Structure Meets Flexibility

https://statwonk.com/hierarchical-bayesian-neural-network.html
1•RA_Fisher•23m ago•0 comments

Jack Dorsey's Block Cuts 4k Jobs

https://bsc.news/post/block-cuts-4000-jobs
1•wyclif•27m ago•1 comments

Becoming a Magician

https://autotranslucence.wordpress.com/2018/03/30/becoming-a-magician/
1•robertvc•29m ago•0 comments

The Sea of Pink Flamingos

https://www.safari.co.za/Kenya_Safari_Guide-travel/nakuru-and-natron-the-pink-seas.html
2•thunderbong•32m ago•0 comments

No more asteroid landing:Engine trouble forces Japan's Hayabusa2 to change plans

https://www.space.com/space-exploration/asteroid-comet-missions/no-more-asteroid-landing-engine-t...
1•bookofjoe•33m ago•0 comments

Show HN: SaaSStatsHub Signals – find website ideas from rising search trends

https://signals.saasstatshub.com/
1•saasstatshub•36m ago•0 comments

Show HN: Hearth 64 – A cozy fireplace screensaver ROM for real N64 hardware

https://github.com/njgreb/n64fireplace
3•gweedo767•41m ago•0 comments

Appeal court says accommodations law for pregnant workers unconstitutional

https://apnews.com/article/law-pregnant-workers-court-appeals-c3b964c0f0cafaed2f20099055eb79cd
3•randycupertino•43m ago•2 comments

Treemap of the Riemann Hypothesis Lean Proof

https://pengowray.github.io/riemann-zeta-proof-visualizer/
3•pengowray•43m ago•0 comments

BYD Ti7 banned in Europe until Land Rover copyright case is resolved

https://www.carexpert.com.au/car-news/byd-ti7-banned-in-europe-until-land-rover-copyright-case-is...
1•r_singh•44m ago•0 comments

Perfect Forward Secrecy in DeltaChat: Autocrypt v2

https://autocrypt2.org/#/what-is-autocrypt-v2
3•xeonmc•44m ago•0 comments

Freeing the Allwinner A733 3.0 Tops NPU Mainline Linux (Etnaviv and Mesa Teflon)

https://github.com/tcmichals/cubie-a5e/blob/main/docs/articles/hackster_a733_vip9000_npu_etnaviv_...
1•tcmichals•45m ago•0 comments

The importance of genes does not predict their mutation rate

https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.3004089
3•docmechanic•46m ago•0 comments

Dario Amodei suggests video games could pacify the masses after AI takes jobs

https://www.theverge.com/ai-artificial-intelligence/1039745/dario-amodei-video-games-ai-joblessness
9•9x39•48m ago•5 comments

Using Fable 5.2 to animate a Riemann Hypothesis proof explainer

https://clankers.fm/riemann
3•scottfits•48m ago•1 comments