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/

UK wants datacenters to pay a fee for grid connection requests

https://www.theregister.com/systems/2026/07/31/uk-wants-datacenters-to-pay-a-fee-for-grid-connect...
1•sieste•1m ago•0 comments

Kitesurf: The agent-first browser that runs in V8 isolates on Cloudflare Workers

https://blog.cloudflare.com/kitesurf/
1•meetpateltech•2m ago•0 comments

Companies need to stop kidding themselves about AI

https://www.nytimes.com/2026/08/03/opinion/ai-hype-tech-layoffs.html
1•rauljara•3m ago•0 comments

Four simple rules behind Japan's most liveable cities

https://www.bbc.com/travel/article/20260805-four-simple-rules-behind-japans-most-liveable-cities
1•tchalla•3m ago•0 comments

How do we stop vibe coding?

https://aklos.substack.com/p/how-do-we-stop-vibe-coding
1•emschwartz•3m ago•0 comments

Meta latest to tell world its AI agent wandered out of test pen

https://www.theregister.com/ai-and-ml/2026/08/06/meta-latest-to-tell-world-its-ai-agent-wandered-...
1•pseudolus•6m ago•0 comments

Trump's tech ties blamed for AI inaction by MAGA Republicans and Democrats

https://www.reuters.com/legal/litigation/trumps-tech-ties-blamed-ai-inaction-by-maga-republicans-...
1•tartoran•7m ago•0 comments

Symbolics Genera to be available under free for non-commercial use license

https://hachyderm.io/@gmpalter/117044268951603975
2•__lm__•7m ago•0 comments

Show HN: How will the Aug 12 eclipse look like from your address?

https://eclipse2026times.com/
2•cpcdoy•8m ago•0 comments

Ask HN: Do you rehearse with AI before seeing a doctor or dentist?

1•markmatsushima•8m ago•0 comments

Show HN: Live Embedded Dashboards on Your GitHub Repo Page

https://github.com/SlickFast/github-dashboard-template
1•AlexRenders•8m ago•1 comments

AI Hacking, Fearmongering and Prometheus

https://askmike.org/articles/ai-hacking-fearmongering-prometheus/
2•askmike•10m ago•1 comments

The crisis of Europe's disappearing rivers

https://theweek.com/environment/the-crisis-of-europes-disappearing-rivers
2•speckx•12m ago•1 comments

Show HN: A browser game for experimenting with cellular societies

https://gameofsociety.alirizasaral.com
1•alirizasaral•15m ago•0 comments

Microbiome manipulation and enhanced weathering influence tree growth

https://www.carboncommunity.org/glandwr-forest-carbon-study
1•zeristor•18m ago•0 comments

Radio Transmission Security

https://transec-taxonomy.pages.dev
1•belabartok39•19m ago•1 comments

Show HN: CaseHero – your own documented copy of every call with a company

https://case-hero.com/
2•root_theory•19m ago•0 comments

Pentagon draws up new nuclear weapons strategy for war with Russia and China

https://www.yahoo.com/news/politics/articles/pentagon-draws-nuclear-weapons-strategy-160127758.html
1•iamnothere•19m ago•1 comments

Whats Good HN

1•amenxv•20m ago•1 comments

Why Do Fewer Renters Expect to Move?

https://libertystreeteconomics.newyorkfed.org/2026/08/why-do-fewer-renters-expect-to-move/
2•jnord•21m ago•0 comments

Show HN: ReflectWorld – Entity-oriented memory system for open-ended video

https://github.com/addxai/ReflectWorld
2•sylvain_ma•21m ago•0 comments

TCM Tongue Diagnosis AI

https://www.sciencedaily.com/releases/2012/05/120526191322.htm
1•sjreese•22m ago•1 comments

Show HN: Interlock – Atomic TypeScript domain transitions on PostgreSQL

https://github.com/jajego/interlock
2•appleappleapple•22m ago•0 comments

1980s Comic the Dark Knight Returns Transformed Batman

https://www.bbc.com/culture/article/20260805-how-the-dark-knight-returns-transformed-batman
1•Tomte•24m ago•0 comments

Show HN: Hope, 1-on-1 AI Tutor for kids Grades 2-10 learning math

https://usehope.app
4•davidest•25m ago•2 comments

Free Energy Principle

https://en.wikipedia.org/wiki/Free_energy_principle
1•binyu•25m ago•0 comments

AI Agents cannot currently conduct open-ended research

https://cruxevals.com/crux/can-ai-agents-conduct-research/
1•automatic6131•28m ago•1 comments

Make It Cheaper - BOM Pricing Optimizer

https://makeitcheaper.grok.me/
1•nevion42•28m ago•1 comments

Another Typical Autoresearch Post – 1,293 Experiments, 779M Tokens, GPUMode 3rd

https://elianaive.com/posts/another-typical-autoresearch-post/
1•elianaive•30m ago•0 comments

Telephones Caught in Between

https://computer.rip/2026-08-02-telephone-leasing.html
1•speckx•35m ago•0 comments