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/

Show HN: Relay – A Mac app that carries replies between Claude, Codex and Cursor

https://kanary.to/agents
1•kenn•39s ago•0 comments

Opsin Raises $21M to Expand Its Risk Protection Layer

https://www.opsinsecurity.com/blog/opsin-raises-21m-to-expand-its-risk-protection-layer
1•ShayNehmad•45s ago•1 comments

Bill Gates returns to wage war on AI risks

https://www.axios.com/2026/10/15/bill-gates-ai-safety-push
2•samizdis•45s ago•0 comments

AMD Helion for Agentic AI and Enterprise

https://ir.amd.com/news-events/press-releases/detail/1301/introducing-amd-helion-agentic-ai-compu...
1•endangeredhuman•1m ago•0 comments

Strategy to Reduce Subscription Churn

https://thesupportqueue.substack.com/p/strategy-to-reduce-subscription-churn
1•vinothkumarnaga•1m ago•0 comments

OCC Releases Report on Large Banks' Debanking Activities

https://www.occ.gov/news-issuances/news-releases/2026/nr-occ-2026-90.html
1•sparrish•1m ago•0 comments

Package managers have an integrity problem

https://blog.trailofbits.com/2026/10/14/package-managers-have-an-integrity-problem/
2•abhisek•3m ago•0 comments

Agent Vault

https://agentvault.io/
2•reinsbr•3m ago•2 comments

Apple Joins Nvidia in the $5T Valuation Club

https://www.wsj.com/tech/seventh-time-is-the-charm-apple-closes-above-5-trillion-market-capitaliz...
2•bookofjoe•3m ago•1 comments

Preparing for the 2026 US Midterms

https://www.anthropic.com/news/2026-us-midterms
3•swolpers•6m ago•0 comments

Loment 0.1.4.5: Tiered GC and Windows Installer Fix

https://fujojtop.github.io/loment-site/
1•FujoLoment•7m ago•0 comments

Has China lost 130M people?

https://www.thetimes.com/world/asia/article/china-falling-population-130-million-nh6jbcftf
4•randycupertino•8m ago•0 comments

Training a 180B-parameter model on a single 8×H100 node

https://physionlabs.ai/blog/nextron
1•ljhnick•10m ago•0 comments

Researchers use AI to design proteins that cut up other protein

https://arstechnica.com/science/2026/10/researchers-use-ai-to-design-proteins-that-cut-up-other-p...
3•dverlaeckt80•11m ago•0 comments

Show HN: BlastLoop, a structure-first coding method for AI agents

https://github.com/rlshaw-ml/BlastLoop
2•rossleeshaw•12m ago•0 comments

Decoding the Super Mario 64 courtyard plaque

https://github.com/supermochi64/sm64-plaque-decode
3•bkfh•12m ago•0 comments

Show HN: Sygal – Convert PDFs, scans and web pages to Markdown, locally

https://sygal.app
2•cyrillsemah•12m ago•0 comments

Collatz Conjecture

https://en.wikipedia.org/wiki/Collatz_conjecture
1•bigwheels•12m ago•0 comments

Jev Meets the Trolley Problem

https://zachlandes.com/trolley-problem/
3•zlandes86•14m ago•1 comments

Why “Mobility” Should Be The Next Big Public Policy Word

https://www.aaronlubeck.com/p/stuck-2-why-mobility-should-be-the
1•idbnstra•14m ago•0 comments

GLM-5.3 raises researcher fears the Chinese model can fake AI safety tests

https://www.scmp.com/tech/big-tech/article/3370963/zais-glm-53-raises-researcher-fears-chinese-mo...
1•theanonymousone•15m ago•0 comments

Do you remember the days when we used to type code by hand in the terminal? [video]

https://www.youtube.com/watch?v=WLih6RtW_hE
1•hayyoth•17m ago•0 comments

Vendicari and the Citrus Before Time

https://erikgauger.substack.com/p/vendicari-and-the-citrus-before-time
1•jger15•17m ago•0 comments

Show HN: I built a 3D semiconductor fab in the browser – design your own terafab

https://semiconfab.org/
1•jinjiefan2018•19m ago•0 comments

Quantum Signatures of Proper Time in Optical Ion Clocks

https://journals.aps.org/prl/abstract/10.1103/qhj9-pc2b
1•Betelbuddy•19m ago•0 comments

Show HN: Council AI. Spot biases / hallucinations in top AI models

https://councilai.app
2•phinnutz•19m ago•0 comments

Show HN: Haakon – Amplify Haiku to Beat Opus

https://haakon.ai/research
1•jplucas4•19m ago•0 comments

A new tool for content creators and videographers

https://contentconsent.cc/
1•andyhartleeds•20m ago•0 comments

Market selloff, rising rates test AI data centre deal boom

https://www.reuters.com/business/finance/market-selloff-rising-rates-test-ai-data-centre-deal-boo...
6•tartoran•21m ago•3 comments

A controversial, cancer-detecting blood test just got backed by key FDA panel

https://www.usatoday.com/story/life/health-wellness/2026/09/24/galleri-cancer-blood-test-fda-cont...
3•elo2000•21m ago•0 comments