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 auto industry is building for a past that's never coming back

https://www.wardsauto.com/news/the-auto-industry-is-building-for-a-past-thats-never-coming-back/8...
1•avonmach•15s ago•0 comments

Show HN: Aidress – open-source discovery and trust registry for agents

https://github.com/Aidress-ai/Aidress
1•mehulv24•20s ago•0 comments

How to secure Manticore Search with built-in authentication and authorization

https://medium.com/@s_nikolaev/how-to-secure-manticore-search-with-built-in-authentication-and-au...
1•snikolaev•7m ago•0 comments

How to export Claude chats to Markdown [video]

https://www.youtube.com/watch?v=eWCf5HGQYMQ
1•quysala12•10m ago•0 comments

America's Bet on AI – The winner takes it all. What if we lose?

https://foreignpolicy.com/2026/08/04/united-states-artificial-intelligence-race-china-openai-anth...
1•mapping365•11m ago•0 comments

Mysterious elephant deaths in Kenya raise questions around pesticides

https://www.bbc.com/news/articles/cx27p32jzj2o
1•ChrisArchitect•13m ago•0 comments

Rands Management Glossary

https://randsinrepose.com/glossary/
1•Garbage•15m ago•0 comments

OcuClaw: One Human, a Fleet of Agents

https://fly.io/customer-stories/ocuclaw/
3•lesenmiaoyu•15m ago•0 comments

America's obsession with whey protein has a delicious consequence: More cheese

https://www.nbcnews.com/business/consumer/americas-obsession-whey-protein-leading-cheese-rcna588939
2•bushwart•21m ago•0 comments

Disney Data Dump: What's the Best Day of the Week to Visit the Magic Kingdom?

https://touringplans.com/blog/disney-data-dump-whats-the-best-day-of-the-week-to-visit-the-magic-...
1•bariumbitmap•21m ago•0 comments

David Ellison: Here's Why You Can Trust Me with the News

https://www.nytimes.com/2026/08/04/opinion/david-ellison-paramount-warner-deal.html
1•aaronbrethorst•22m ago•1 comments

New museum find shows nature can't stop inventing seahorses

https://phys.org/news/2026-08-museum-nature-seahorses.html
1•MaxLeiter•23m ago•0 comments

The Investing Heavyweights That Backed Situational Awareness Before It Blew Up

https://www.wsj.com/finance/investing/the-investing-heavyweights-that-backed-situational-awarenes...
1•vdalal•28m ago•0 comments

Google AI Studio exposed. Drive Trash is fake

https://scored.co/c/News/p/1ATC9NarFD/google-drive-trash-is-just-a-vis/c
1•Bitu79•29m ago•1 comments

Dark Mode for Pinterest – Themes and Night Mode

https://www.sortpin.com/pinterest-dark-mode
1•trungpv1601•29m ago•0 comments

OpenAI's Unreleased Model Astra Solves Ten Major Open Mathematics Problems

https://thezvi.substack.com/p/openais-unreleased-model-astra-solves
1•paulpauper•30m ago•1 comments

Cyberpunk on 1GB of VRAM [video]

https://www.youtube.com/watch?v=H6uX-PI95ok
2•behnamoh•30m ago•0 comments

Roby Yonge

https://en.wikipedia.org/wiki/Roby_Yonge
2•petethomas•31m ago•1 comments

Hackerne.ws Cert Needs Updating

https://hackerne.ws
2•mproud•31m ago•2 comments

Ukrainian and Iran War Coalescence Discussion

https://open.spotify.com/episode/2Q6jmheUC8nTDDEH9xgL4h
1•silver92bullet•32m ago•0 comments

Designing a Query System

https://bal-e.org/speed/krabby/2026/query-system-design/
1•vinhnx•33m ago•0 comments

In-Terminal Jupyter Notebook for Agentic Data Science

https://www.reddit.com/r/ClaudeAI/comments/1vfv9a3/interminal_jupyter_notebook_for_agentic_data/
2•syumei•33m ago•1 comments

Cookies leaked to the wrong host: a URL parsing differential in tough-cookie

https://hackzero.ai/learn/tough-cookie-cookie-leak
1•cuaupadilla•36m ago•0 comments

Survey Statistics: structured MRP to smooth survey weights

https://statmodeling.stat.columbia.edu/2026/08/04/survey-statistics-structured-mrp-to-smooth-surv...
1•paulpauper•40m ago•0 comments

Economy in an automated post-scarcity society

https://qalamjadal.substack.com/p/economy-in-a-fully-automated-post
4•x0axz•41m ago•2 comments

Lunch With Freeman Dyson, in 196,883 Dimensions

https://mathshistory.st-andrews.ac.uk/Obituaries/Dyson_2_NY_Times/
2•paulpauper•42m ago•0 comments

The little-told story of the WWII pet cull (2013)

https://www.bbc.com/news/magazine-24478532
3•Teever•43m ago•0 comments

Cloudflare Wallet, developers who need it can reserve a name they like

https://cloudflare.pay/
1•BearBest•43m ago•1 comments

Show HN: Structured search for Who is hiring threads

https://gethnjobs.com/
1•hboon•45m ago•0 comments

All Knowledge Is Provisional (2024)

https://www.sebastianmellen.com/post/2024/all-knowledge-is-provisional/
3•andsoitis•47m ago•0 comments