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/

I wrote a lighthearted guide to learning Monads – maybe you like

https://github.com/ManuelSaleta/CavemanProgramming/blob/main/Monads/README.md
1•signa11•1m ago•0 comments

Responsive Text and Code

https://unsung.aresluna.org/responsive-text-and-code/
2•srijan4•4m ago•0 comments

Will anybody use AI as much as coders do?

https://www.economist.com/business/2026/08/30/will-anybody-use-ai-as-much-as-coders-do
3•nialse•8m ago•0 comments

DJCJ Arcade – MAME front end for macOS

https://github.com/DJCJ-website/DJCJArcade
2•chriscjcj•15m ago•1 comments

Google Compute shut down my server for distributing malware

2•farzher•21m ago•0 comments

Show HN: Engrim – A universal, local-first SQLite memory engine for AI CLIs

https://github.com/timgordontg/engrim
3•timgordontg•22m ago•0 comments

TiVo to charge money for skipping commercials in your own recordings

https://cordcuttersnews.com/tivo-plans-to-end-free-automatic-commercial-skipping-in-november-test...
3•dmitrygr•31m ago•0 comments

Show HN: The Duck Has WiFi, a music video drawn with Python

https://www.youtube.com/watch?v=_h1KgS169iM
3•modinfo•33m ago•0 comments

HPE Gives Oracle Right to Buy 4.2M Shares for 1 Cent Each

https://www.forbes.com/sites/antoniopequenoiv/2026/09/03/hewlett-packard-enterprise-gives-oracle-...
4•gurjeet•33m ago•0 comments

I refused to train the AI that could replace me

https://restofworld.org/2026/ai-training-jobs-expert-replacement/
4•colinprince•34m ago•0 comments

The Instinct Thesis: Why Memory Is Becoming the Moat

https://twitter.com/ashwingop/status/2093026452929405356
2•yarapavan•34m ago•0 comments

Marginal Revolution University: Economics for Everyone,taught by econ professors

https://mru.org
2•gurjeet•37m ago•0 comments

I just don't care about your skill files

2•drunkpotato•38m ago•1 comments

From NAND to Tetris (book and course) [video]

https://www.youtube.com/watch?v=LqirVc5SlW0&list=PLrDd_kMiAuNmSb-CKWQqq9oBFN_KNMTaI
3•nomilk•39m ago•1 comments

Show HN: Server hardening playbook where every item is failure/fix/verify

https://github.com/Sanexxxx777/server-hardening-playbook
2•Aleksandr_NFA•41m ago•0 comments

A HN that is better than HN

https://hn.4mn.org/
3•HNSucksDick•42m ago•1 comments

Samsung Debuts zHBM Prototype, Stacking Memory Directly on AI Accelerators

https://www.thelec.net/news/articleView.html?idxno=12835
2•peter_d_sherman•44m ago•1 comments

He's Letting AI Agents Invest His Money. They Even Have Names

https://www.wsj.com/tech/ai/the-ai-shift-turning-everyday-investors-into-mini-quant-funds-ebe4d45f
3•thm•48m ago•0 comments

Show HN: GasMeUp – A gas app that factors in detour time and tank size

https://gasmeup.app/
1•Sharanxxxx•48m ago•0 comments

Show HN: GuidedReview – Review AI-generated code before you sign your name to it

https://github.com/nshntarora/guidedreview
1•nshntarora•49m ago•0 comments

I made legacy SOAP APIs usable by AI agents

https://github.com/bvenkata/legacy2mcp
1•balajijoe5•52m ago•0 comments

Show HN: Golden hour API and a 3D globe of the best light

https://golden.sendafun.com/
2•gpszys•53m ago•0 comments

Coop – Isolated VM Environments for Running Claude Code and Codex

https://github.com/trailofbits/coop
3•aggrrrh•53m ago•0 comments

Iran's Hormuz leverage wanes as US economic squeeze bites

https://www.reuters.com/business/energy/irans-hormuz-leverage-wanes-us-economic-squeeze-bites-202...
1•kaycebasques•53m ago•0 comments

Filepack

https://rodarmor.com/blog/filepack/
1•greyface-•1h ago•0 comments

'RAMageddon' hits consumer electronics as AI drains chip supply

https://www.ft.com/content/ea9a9dcc-b1df-49b0-b80c-f320161b9efa
6•sbulaev•1h ago•0 comments

Tell HN: Anthropic should make Claude the Author and me the Co-Author

3•xeonax•1h ago•2 comments

US Republicans revolt against Flock AI surveillance as backlash intensifies

https://www.ft.com/content/b207536e-6def-4080-878f-d0eba61d11e0
5•sbulaev•1h ago•1 comments

British Museum faces question over Peter Thiel's private Bayeux Tapestry viewing

https://www.londondaily.news/__sentry/balanced/british-museum-faces-questions-over-peter-thiels-p...
4•frm88•1h ago•1 comments

A makeover for college: No gym, no meal plan and two years of work

https://www.npr.org/2026/09/01/nx-s1-5935431/college-reinvented-vermont-work-experience
1•juanplusjuan•1h ago•0 comments