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/

What LLMs Should Do

https://adamperesztegi.com/posts/what-llms-should-do/
1•nevertoolate•36s ago•0 comments

China created a system that simulates the Earth with billions of AI agents

https://twitter.com/howtoprompt__/status/2086110097663795365
1•fragmede•3m ago•1 comments

Generative AI threatens to upend citizen science records

https://phys.org/news/2026-08-creatures-born-code-generative-ai.html
1•programd•3m ago•0 comments

I Turned Off Google Adsense

https://www.cannonade.net/blog/why-i-turned-off-google-adsense
1•redbluething•3m ago•0 comments

Show HN: OneRingAI v1 – TypeScript agents with integrations and graph memory

https://github.com/aantich/oneringai
1•jhoxray•3m ago•0 comments

Show HN: My WHOOP has no screen. My Kindle had no job. So I put them together

https://github.com/kaibuildsai/kindle-for-whoop
2•kaibuidsai•4m ago•0 comments

Show HN: Would your AI audit logs survive an audit challenge?

https://github.com/Rehanrana11/evidence-verify
1•rmasoodx22•6m ago•0 comments

Why/How is a negative times a negative a positive?

https://old.reddit.com/r/explainlikeimfive/comments/1vje5br/eli5_whyhow_is_a_negative_times_a_neg...
1•bilsbie•11m ago•0 comments

Netflix Queries Its Real-Time Distributed Graph with gRPC

https://netflixtechblog.com/how-and-why-netflix-built-a-real-time-distributed-graph-part-3-queryi...
1•sbulaev•16m ago•0 comments

Show HN: HN Hiring – Search and Filter Who Is Hiring

https://hnhiring.azuanz.com
2•azuanrb•18m ago•0 comments

Show HN: Xprem: Self-hosted OTA updates and observability for Expo apps

1•madscripten•20m ago•0 comments

Why Wall Street Is Ignoring Big Tech's Debt

https://www.youtube.com/watch?v=NufJ7g63KSY
3•johnbarron•22m ago•0 comments

70% of AI revenue comes from OpenAI and Anthropic

https://www.youtube.com/watch?v=68X8yEatepQ
2•johnbarron•27m ago•0 comments

Dutch bank: Extreme heat could wipe out Dutch, EU economic growth this year

https://nltimes.nl/2026/08/09/dutch-bank-extreme-heat-wipe-dutch-eu-economic-growth-year
3•giuliomagnifico•30m ago•0 comments

Show HN: Choq: Cherry (ClojureScript) on QuickJS

https://github.com/squint-cljs/choq
2•Borkdude•31m ago•1 comments

UAE oil output hits all time high in 2026

https://oilprice.com/Latest-Energy-News/World-News/UAE-Oil-Output-Hits-All-Time-High-Doubling-Pre...
2•spwa4•32m ago•0 comments

Darwin Was Right About Sex Roles

https://www.stevestewartwilliams.com/p/darwin-was-right-about-sex-roles
1•Anon84•33m ago•0 comments

A small PHP guestbook

https://twitter.com/__tosh/status/2086418779920105952
1•tosh•37m ago•0 comments

Show HN: DeepSeek-V4 Latent Reasoning – moving "thinking" into latent space

https://blog.n.ichol.ai/packaging-latent-reasoning-as-a-real-model
1•nmitchko•37m ago•0 comments

Drought Threatens the Rhine, a Vital Economic Artery in the Heart of Europe

https://www.nytimes.com/2026/08/06/business/rhine-drought-germany-economy.html
3•bookofjoe•38m ago•1 comments

Yuval Noah Harari on AI, Human Stupidity, and the Future of Civilization [video]

https://www.youtube.com/watch?v=bZL1NsrfuYE
2•thelastgallon•39m ago•0 comments

Reviving a four year old reMarkable 2

https://oskrim.github.io/hardware/2026/08/09/remarkable-over-ssh.html
6•tremguy•44m ago•0 comments

Sperm whale communication clicks can travel up to 70 km

https://bio.au.dk/en/about-biology/news-and-events/show/artikel/verdens-kraftigste-clickbait
2•ashurandi•48m ago•0 comments

Data Warehouse Isn't Integrated Just Because the Tables Are in One Place

https://seattledataguy.substack.com/p/your-data-warehouse-isnt-integrated
2•eigenBasis•50m ago•0 comments

Everything You Do Is Being Recorded

https://www.theatlantic.com/technology/2026/05/ai-wearable-surveillance-countermeasures/687203/
21•ike_usawa•53m ago•11 comments

Silencing brain's prefrontal cortex boost creative problem-solving in mice

https://news.emory.edu/stories/2026/08/how-mice-learn-think-out-box-neuroscience-surprise
1•giuliomagnifico•55m ago•0 comments

Show HN: Inspect any MCP server – latency, token usage, and security scans

https://github.com/ytkoka/mcp-tester
1•ytkoka•59m ago•0 comments

Switching to electric stoves can dramatically cut indoor air pollution

https://news.stanford.edu/stories/2025/12/gas-propane-stoves-nitrogen-dioxide-exposure-health-ris...
3•Doriell•1h ago•0 comments

Real Engineers Dig with Their Bare Hands

https://www.minid.net/2026/7/14/how-to-automatise-with-ai
4•meerita•1h ago•0 comments

A quick look at zero-knowledge proofs

https://bernsteinbear.com/blog/zkp/
3•birdculture•1h ago•0 comments