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: Making a smart TV dumb and then smart

https://github.com/anubhavmalhotra/r2d2-tv
2•animalhot•3m ago•0 comments

Elon Musk Just Threatened the Coming Democratic Majority

https://www.thebignewsletter.com/p/elon-musk-just-threatened-the-coming
2•chmaynard•3m ago•0 comments

Scoop: Unvetted AI agents are accessing U.S. bank accounts

https://www.axios.com/2026/10/22/ai-agents-banks-unauthorized-accounts-access
2•choult•6m ago•0 comments

GM Aims to Bring 'Eyes-Off' Driving to AI-Powered Cars Within 2 Years

https://www.nytimes.com/2026/10/21/business/gm-ai-electric-vehicles-china.html
2•bookofjoe•7m ago•1 comments

From Eyeballs to ARR: Buzzy Pricing Metrics and the AI Trade

https://aswathdamodaran.substack.com/p/from-eyeballs-to-arr-buzzy-pricing
2•toomuchtodo•7m ago•0 comments

America is Booming into a Ghost Town [video]

https://www.youtube.com/watch?v=rX0RuKswLAo
2•idbnstra•12m ago•0 comments

Getty Images files for US bankruptcy, advances restructuring plan

https://www.reuters.com/legal/litigation/getty-images-files-us-bankruptcy-advances-restructuring-...
3•CharlesW•16m ago•0 comments

Mapping the Northern Sky

https://www.maps.com/star-map-charts-stars-and-constellations-of-northern-hemisphere/
4•tmseidman•17m ago•0 comments

Jank – The native Clojure dialect with seamless C++ interop

https://jank-lang.org/
1•giancarlostoro•17m ago•0 comments

L'Oreal says weight loss drugs are impacting beauty and skin care sales

https://www.bbc.com/news/articles/cvglwgwpgrlpo
2•BiraIgnacio•17m ago•0 comments

kirsch – A versatile bitmap font with an organic flair

https://github.com/molarmanful/kirsch
1•noriax86•18m ago•0 comments

Show HN: Impossible Machines: declaratively program the physical world

https://www.impossiblemachines.xyz
1•bhaprayan•19m ago•0 comments

Neal.fun – About

https://neal.fun/about/
1•thunderbong•19m ago•0 comments

Moderna and Merck cancer vaccine met key endpoints in melanoma trial

https://www.statnews.com/2026/10/22/esmo-moderna-merck-cancer-vaccine-intismeran-data-released/
1•bryan0•27m ago•0 comments

Docker Is Weird

https://codeandcake.dev/posts/2026-10-22-docker-is-weird
4•psxuaw•27m ago•0 comments

AI compute is the new oil–and needs a new market

https://www.economist.com/finance-and-economics/2026/10/22/ai-compute-is-the-new-oil-and-needs-a-...
2•ijidak•28m ago•0 comments

UN says breaching 1.5C warming limit is 'imminent and unavoidable'

https://www.cnn.com/2026/10/21/climate/cop31-un-climate-report-emissions-gap
5•dabinat•35m ago•2 comments

Amazon won't build data centers in Loudoun County in deal with local leaders

https://www.washingtonpost.com/dc-md-va/2026/10/22/amazon-wont-build-data-centers-loudoun-county-...
1•reaperducer•36m ago•0 comments

WolfSentry: WolfSSL's Embedded Intrusion Detection and Prevention System (IDPS)

https://github.com/wolfSSL/wolfsentry
1•aidangarske•37m ago•0 comments

The Next Bottleneck in AI for Science

https://www.mixtureofexperts.co/p/the-next-bottleneck-in-ai-for-science
1•gmays•45m ago•0 comments

We Have Traits at Home

https://www.axelmagn.com/blog/202610-zig-traits/
1•Ygg2•49m ago•0 comments

We probably cannot automate the software engineer away

https://thelastsoftwareengineer.substack.com/p/we-probably-cannot-automate-the-software
3•azhenley•53m ago•0 comments

Coding Magic the Gathering in C# – Part Two – The Impossible Magic Card

https://www.youtube.com/watch?v=Xbfzye07Xrg
3•birdculture•54m ago•0 comments

Building Saver Insights: Turning particles into a graph

https://up.com.au/blog/saver-insights/
1•0neSe7en•55m ago•0 comments

Elon Musk pours $366M into midterm Republican campaigns

https://www.cnbc.com/2026/10/22/elon-musk-midterm-election-spacex-tesla.html
9•Alien1Being•56m ago•3 comments

GitHub now uses a generic avatar instead of "Identicons" for new profiles

5•winkelmann•58m ago•1 comments

OpenAI trims valuation target after pitching higher price

https://www.ft.com/content/bb564eb1-79d4-4694-aa24-1155202a9abc
2•Alien1Being•58m ago•1 comments

DisplaySwitcher

https://nebulasoftware.com/product/displayswitcher/
1•BoydEdmondson•58m ago•0 comments

Geoffrey Hinton: 'I think there's a 1% chance it will destroy us'

https://english.elpais.com/science-tech/2026-10-21/geoffrey-hinton-the-godfather-of-ai-im-not-a-d...
1•geox•1h ago•0 comments

Attie

https://attie.ai/login
1•jcbhmr•1h ago•0 comments