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/

BlueSCSI Milestones

https://bluescsi.com/milestones
1•rbanffy•1m ago•0 comments

The Library of Ashurbanipal

https://www.historytoday.com/archive/feature/library-ashurbanipal
1•samizdis•1m ago•0 comments

Are You a Human?

https://www.newyorker.com/magazine/2026/08/17/are-you-a-human
1•littlexsparkee•2m ago•0 comments

OpenAI Daybreak Red

https://developers.openai.com/api/docs/models/daybreak-red-latest
1•_pdp_•2m ago•0 comments

Dyna-2: A 1M-Hour Scaling Law for World-Action Models

https://www.dyna.co/dyna-2
1•skylerwiernik•2m ago•0 comments

iMessage Agents

1•anr0•3m ago•0 comments

High-orbit satellites could light the way for travel to the moon

https://news.mit.edu/2026/high-orbit-satellites-could-light-way-for-travel-to-moon-0810
1•gnabgib•3m ago•0 comments

Working on documents with your AI chat

https://revise.io/blog/08-10-2026/working-on-documents-with-your-ai-chat
2•artursapek•4m ago•0 comments

Armenia just opened the region biggest AI factory, because Trump signed licence

https://thenextweb.com/news/firebird-armenia-ai-factory-export-licence-compute-diplomacy
3•rbanffy•6m ago•0 comments

The Beauty of Settled Science

https://www.astralcodexten.com/p/the-beauty-of-settled-science
2•toomuchtodo•7m ago•0 comments

Seas have hit hottest temperature on record for July

https://www.theguardian.com/environment/2026/aug/10/global-seas-hottest-temperature-july-scientists
3•cuoder•8m ago•0 comments

Spy cameras on Navy drones sent data to China

https://www.telegraph.co.uk/news/2026/08/09/spy-cameras-on-navy-drones-secretly-sent-data-to-china/
3•like_any_other•8m ago•1 comments

There are 25% more psychotherapy sessions at 53 minutes than at 52

https://www.trytwofold.com/insights/53-minute-billing-threshold
2•ragswag•8m ago•0 comments

Corals Spin Tiny Vortices to Get Oxygen, but Not If It's Too Hot

https://www.quantamagazine.org/corals-spin-tiny-vortices-to-get-oxygen-but-not-if-its-too-hot-202...
1•rbanffy•10m ago•0 comments

Anthropic just proved AI isn't getting better

https://www.youtube.com/watch?v=xWxFEZICuwU
3•kesor•11m ago•0 comments

Putting frontier cyber models in more trusted hands – OpenAI

https://openai.com/index/putting-frontier-cyber-models-in-more-trusted-hands/
2•speckx•11m ago•0 comments

Slopocop: ESLint for TypeScript Slop

https://github.com/LBognanni/slopocop
1•lorisdev•11m ago•1 comments

Claude Code no longer limits sessions to 200 spawned subagents

https://github.com/anthropics/claude-code/commit/66edf5358349356774812264b75b8ea792f0d0a3
1•bakigul•11m ago•0 comments

Attacker Takes over Zoom AI

https://www.promptarmor.com/resources/attacker-takes-over-zoom-ai
3•hackerBanana•12m ago•0 comments

NYT Report Good News for Flock, but Overlooks Seven Major Problems

https://ipvm.com/reports/nyt-flock
1•jhonovich•13m ago•0 comments

Claude Sonnet 5 introductory pricing made permanent

https://twitter.com/claudeai/status/2086891169217122586
3•bvogelzang•15m ago•1 comments

C64 Demo: The Lab by Elysium (6 June 2026) [video]

https://www.youtube.com/watch?v=9g91vnJ6Bz4
1•austinallegro•15m ago•0 comments

Show HN: Étincel trains Claude's voice for PR reviews and code comments

https://github.com/AIStoryHub/etincel
1•jeeps1911•15m ago•0 comments

Investors Want Quarterly Reports, Unfavorable Results and All

https://www.bloomberg.com/graphics/2026-semiannual-reporting-obscures-bad-results/
2•petethomas•18m ago•0 comments

Tech leaders say AI means less work; staff say they work up to 90 hours a week

https://www.bbc.com/news/articles/cvgx4yd1gl2o
7•billybuckwheat•18m ago•1 comments

Elon Musk and the Infinity Rebuy

https://davekarpf.substack.com/p/elon-musk-and-the-infinite-rebuy
5•highfrequency•18m ago•0 comments

Major Oak: Ancient 'Robin Hood' tree is dead, experts say

https://www.bbc.com/news/articles/clyer9m0jmko
3•speckx•22m ago•0 comments

SpaceX plan for rocket launch site on Louisiana coast sparks backlash

https://www.theguardian.com/us-news/2026/aug/10/spacex-rocket-launch-site-louisiana-backlash
3•jethronethro•22m ago•0 comments

Ask HN: What new tools are you using?

3•jjcm•26m ago•0 comments

Nvidia is pulling Wall Street into the AI buildout

https://thenextweb.com/news/nvidia-500-billion-wall-street-ai-infrastructure-funding-package
5•berkeleyjunk•26m ago•0 comments