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/

South Korea education minister resigns over exam cheating scandal

https://www.bbc.com/news/articles/cw3dgk29d37no
1•Betelbuddy•44s ago•0 comments

Show HN: Loom – Memory that follows the code you edit

https://github.com/ClickHouse/loom
1•zlareb•2m ago•0 comments

COP31 climate talks fail to agree deal over fossil fuels row

https://www.bbc.com/news/live/crly5w901n20t
1•Betelbuddy•4m ago•0 comments

Ambient Listening: The Absence of a Recording Isn't the Absence of Surveillance

https://macanorak.com/siri-recap-on-apple-watch-the-problem-with-being-listened-to/
3•MacAnorak•6m ago•0 comments

Nuclear Nonproliferation Treaty and the German Nuclear Question Part 1 1954-1964

https://www.wilsoncenter.org/blog-post/the-nuclear-nonproliferation-treaty-and-the-german-nuclear...
1•Bluestein•12m ago•0 comments

Show HN: Cordium – FOSS sandbox platform on Kubernetes to eliminate credentials

https://github.com/octelium/cordium
1•geoctl•12m ago•0 comments

This Month in Redox – October 2026

https://www.redox-os.org/news/this-month-261031/
2•DeepLogin•13m ago•0 comments

Shed Skin restricted-Python to C++ transpiler v1.0 released

http://shed-skin.blogspot.com/2026/11/shed-skin-restricted-python-to-c.html
1•lumpa•18m ago•0 comments

Prisons get OK to jam contraband phones

https://arstechnica.com/tech-policy/2026/11/prisons-get-ok-to-jam-contraband-phones-ctia-says-nea...
2•turbocon•19m ago•0 comments

DKIM2 draft tracker: where every draft and open question stands

https://dmarcguard.io/blog/dkim2-draft-tracker/
1•meysamazad•19m ago•0 comments

Problem with Concurrent Linter Fixes

https://jfmengels.net/concurrent-linter-fixes/
1•fagnerbrack•19m ago•0 comments

Testing Terraform with AWS Emulator

https://notes.hatedabamboo.me/terraform-tests-with-aws-emulator/
2•meysamazad•19m ago•0 comments

Why Your Amazon Echo Broadcasts a Hidden Wi-Fi Station (Even with Sidewalk Off)

https://tonym.us/amazon-echo-hidden-wifi-network.html
2•meysamazad•20m ago•0 comments

Show HN: Retro 3D library, a small game

https://engineersneedart.com/gunport/
2•JKCalhoun•24m ago•0 comments

Meta's India offices hit by opposition protests over account removals

https://www.cnbc.com/2026/11/21/metas-india-offices-hit-by-opposition-protests-over-account-remov...
2•vinni2•28m ago•0 comments

Fixing Google's Feedburner problem, and caching that half works

https://joshua.hu/fixing-google-feedburner-cache-problem-atom-rss
1•frostbyte7•29m ago•0 comments

Scientists Tried to Kill This Dirt, but It Wouldn't Die

https://www.wired.com/story/scientists-tried-to-kill-this-dirt-but-it-wouldnt-die/
1•Brajeshwar•29m ago•0 comments

The joy of why is disappearing in math

https://rtmkrptn.github.io/posts/the-joy-of-why-is-disappearing-in-math/
1•rtmkrptn•32m ago•0 comments

Why Was Hilbert So Pressed About the Riemann Hypothesis? [video]

https://www.youtube.com/watch?v=vp_g5609KjE
1•marvinborner•34m ago•0 comments

Algorithmic Implications of the Proof of the Generalized Riemann Hypothesis

https://twitter.com/Md_Sadiq_Md/status/2123838935961100317
2•pfdietz•35m ago•0 comments

SpaceX and Anthropic Ran an Unusual IPO Process

https://www.reuters.com/world/like-spacex-anthropic-ran-an-unusual-ipo-process-chafing-some-banke...
4•monster_group•35m ago•0 comments

The Grammar of Simulation

https://simgrammar.com/
1•bpierre•42m ago•0 comments

Show HN: NestDaddy Memory, one memory shared by ChatGPT, Claude and Cursor

https://nestdaddy.com/memory
3•nestdaddy•43m ago•1 comments

Cloudflare WAF protects against ruby2shell (CVE-2026-132825)

https://blog.cloudflare.com/ruby2shell-waf-protection/
1•motolibre•44m ago•0 comments

AI Explorables: Big Ideas in Machine Learning (People and AI Research (Pair))

https://pair.withgoogle.com/explorables/
1•vismit2000•45m ago•0 comments

The Beautiful but Annoying Rigidity of Dead Languages

https://nntaleb.substack.com/p/on-the-beautiful-but-annoying-rigidity
1•Michelangelo11•47m ago•0 comments

I won't leave mathematics, despite AI solving centuries-old problems

https://www.theguardian.com/commentisfree/2026/nov/22/why-i-wont-leave-mathematics-despite-ai-sol...
1•artninja1988•50m ago•0 comments

Intel says its graphics-free GPU beats Nvidia's by up to 5.9x in benchmarks

https://www.techspot.com/news/114624-intel-graphics-free-d270-gpu-beats-nvidia-rtx.html
2•theanonymousone•51m ago•0 comments

Show HN: Marketing Can Ship to Production

https://appos.build/kitewell/
2•KingOfCoders•54m ago•0 comments

AI is becoming a disaster for the climate

https://www.bloodinthemachine.com/p/ai-is-becoming-a-disaster-for-the
26•Brajeshwar•1h ago•3 comments