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/

Tesla shares tumble 11% after discounts hit profits

https://www.ft.com/content/dc5e629b-562c-41e3-8b89-350af6960adc
1•doener•28s ago•0 comments

What Happened When Flock Came to My Town

https://www.404media.co/what-happened-when-flock-came-to-my-town/
1•Jimmc414•1m ago•0 comments

Lazarus Group Using Git Hooks to Hide Malware – Open-Source Malware Blog

https://opensourcemalware.com/blog/lazarus-group-uses-git-hooks-to-hide-malware
1•vinnyglennon•1m ago•0 comments

California legislature removes REAL-ID compliance from Governor's budget

https://papersplease.org/wp/2026/06/15/california-legislature-removes-real-id-compliance-from-gov...
2•Jimmc414•1m ago•0 comments

Blacklight, our privacy inspector tool, now tracks X and TikTok pixels

https://themarkup.org/blacklight/2026/02/09/blacklight-update-tiktok-x-twitter
1•Jimmc414•2m ago•0 comments

FDA reports new outbreak of explosive diarrhea with 72 cases identified

https://arstechnica.com/health/2026/07/fda-reports-new-outbreak-of-explosive-diarrhea-with-72-cas...
3•nianderwallace•3m ago•0 comments

Oracle signs 10-year software contract with Pentagon worth up to $7B

https://www.cnbc.com/2026/07/23/oracle-wins-10-year-pentagon-software-contract-worth-up-to-7-bill...
2•srameshc•4m ago•0 comments

Demios – AI-native workspace for data capture, workflow automation and reporting

https://wwww.demios.io
1•mahdishavandi•6m ago•0 comments

Pinjour – An App for the Outdoors

https://jfornear.com/2026/07/24/pinjour-photo-maps/
2•flowmerchant•8m ago•0 comments

Ask HN: What's a great opening line you know?

1•chistev•9m ago•2 comments

Mark Zuckerberg launches AI optimism campaign

https://www.axios.com/2026/07/23/mark-zuckerberg-ai-optimism
2•andsoitis•9m ago•0 comments

Pip install Postgres – no Docker/Brew/apt

https://github.com/leontrolski/postgresql-testing
1•leontrolski•9m ago•1 comments

The first racket sport smart wearable

https://aurevo-rose.vercel.app/
1•elilourens•11m ago•1 comments

Dog Photographer Loses Copyright Case over AI-Generated Version of Her Image

https://petapixel.com/2026/07/22/dog-photographer-loses-copyright-case-over-ai-generated-comic-ve...
2•ColinEberhardt•11m ago•0 comments

Why Trump's Neglect of Working Families Is a Wake-Up Call for Voters

https://bluepressjournal.substack.com/p/the-housing-bill-snub-why-trumps
1•WinstonWendell•11m ago•0 comments

Google reportedly working on ultra-efficient AI chip for Gemini

https://thedailycompute.beehiiv.com/p/google-reportedly-working-on-ultra-efficient-ai-chip-for-ge...
2•theanonymousone•13m ago•0 comments

Show HN: Skim – a minimalist open-source email client for Windows (MIT)

https://skim-tech.com/
1•nikitazarubin•15m ago•0 comments

SLAC to lead AI project to recover critical metals from Li-ion battery waste

https://www6.slac.stanford.edu/news/2026-07-22-slac-lead-genesis-mission-ai-project-recover-criti...
1•rbanffy•15m ago•0 comments

Coin Used for Bus Fare Turns Out to Be 2k-Year-Old Carthaginian Artifact

https://mymodernmet.com/ancient-carthaginian-coin-found/
3•bryanrasmussen•16m ago•0 comments

Elon Musk's Vision of the Future

https://www.economist.com/business/2026/07/23/elon-musks-vision-of-the-future
1•dsubburam•18m ago•1 comments

In search of a collaborative internet without big tech and server farms

https://seamside.com/docs/
3•akumpf•20m ago•0 comments

Namecheap Gave My Account to an Unverified Third Party Just Because They Asked

12•Thrashed•21m ago•0 comments

Microsoft responds to LG monitors installing McAfee ads on Windows

https://arstechnica.com/gadgets/2026/07/microsoft-responds-to-lg-monitors-installing-mcafee-ads-o...
3•worldsavior•23m ago•0 comments

Exploring Gymflation with AI

https://cbowdon.github.io/posts/gymflation/
1•sebg•24m ago•0 comments

Doctor Dario (Game)

https://doctordario.ai/
2•ipince•26m ago•0 comments

Evaluating AI Agents: A Production Blueprint with Strands and AgentCore

https://aws.amazon.com/blogs/machine-learning/evaluating-ai-agents-a-production-blueprint-with-st...
1•Imbiss•27m ago•0 comments

Colorblind: Checking figure accessibility for colour blind people

https://quantixed.org/2022/05/19/colorblind-checking-figure-accessibility-for-colour-blind-people/
1•sebg•27m ago•0 comments

Stripe in talks to buy OpenRouter for ~10B

https://www.wsj.com/tech/ai/stripe-in-talks-to-buy-buzzy-ai-model-marketplace-openrouter-decc6a74
8•htrp•27m ago•0 comments

Ask: Why does everything Microsoft create lately feel fragile and half-baked?

2•nothrowaways•30m ago•2 comments

ADTs (Algebraic Data Types) in Java

https://rockthejvm.com/articles/algebraic-data-types-in-java
1•theanonymousone•31m ago•0 comments