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/

Meta ran ads for an app promising to nudify female politicians

https://arstechnica.com/ai/2026/08/meta-ran-ads-for-an-app-promising-to-nudify-female-politicians/
2•rbanffy•24s ago•0 comments

I soldered for the first time and fixed my daughters toy

https://unixdad.com/soldered-first-time/
1•lignux•27s ago•0 comments

London brewery is begging customers to stop queuing in single file at the bar

https://metro.co.uk/2026/08/19/london-brewery-begging-customers-stop-queuing-single-file-bar-2941...
1•pseudolus•1m ago•0 comments

Show HN: Sharpen blurry photos locally in the browser

https://convertix-fast-imager-co.blogspot.com/p/convertix-free-online-image-enhancer.html
1•convertix123•2m ago•1 comments

AI agent suggested installing a malware package. Engineer almost took its advice

https://www.theregister.com/security/2026/08/20/ai-agent-suggested-installing-a-malware-package-e...
1•sbulaev•4m ago•0 comments

Hammerhead Worms

https://en.wikipedia.org/wiki/Bipalium
1•tosh•4m ago•0 comments

Google's AI photoscanner can determine body fat through selfies

https://arxiv.org/abs/2603.27017
2•Phreaker00•4m ago•1 comments

Show HN: I trained a 125M model to autocomplete piano on-device

https://simedw.com/2026/08/20/midi-autocomplete/
1•simedw•6m ago•0 comments

Open-source, Accessible, and Customizable 3D-printed Humanoid Robot

https://lite.berkeley-humanoid.org/
1•bilsbie•6m ago•0 comments

Dark energy and quantum gravity may be deeply intertwined

https://phys.org/news/2026-08-dark-energy-quantum-gravity-deeply.html
1•samizdis•7m ago•0 comments

Ask HN: What AI automations have you kept running in production?

1•Harish_0089•7m ago•0 comments

138M children are in child labor. What does this mean?

https://ourworldindata.org/138-million-children-are-in-child-labor-what-does-this-actually-mean
1•surprisetalk•7m ago•0 comments

Show HN: FillBook – A trade journal for Kalshi with fee-adjusted P&L

https://fillbook.io
1•fillbookio•10m ago•0 comments

U.S. preparing to force Netherlands to ban ASML from selling to China

https://nltimes.nl/2026/08/20/us-preparing-force-netherlands-ban-asml-selling-china
3•giuliomagnifico•10m ago•0 comments

Echo of Einstein: An unexpected link between whale calls and special relativity

https://phys.org/news/2026-08-echo-einstein-unexpected-link-whale.html
1•pseudolus•11m ago•0 comments

Retro multiplayer world is also an IRC client

https://freeq.at/blog/this-retro-multiplayer-world-is-also-an-irc-client/
1•chadfowler•12m ago•0 comments

Associations of habitual coffee intake w/ testosterone & cardiometabolic markers

https://link.springer.com/content/pdf/10.1007/s00394-026-04038-z.pdf
1•bushwart•13m ago•0 comments

British Groups Push Age Verification Bills in 21 US States

https://reclaimthenet.org/report-british-groups-push-age-verification-bills-in-21-us-states
2•ironyman•14m ago•0 comments

Coin-Op and Console Game Promo Tapes

https://brianpeek.com/coin-op-and-console-game-promo-tapes/
1•cainxinth•15m ago•0 comments

Kingmakers: Crypto, AI, betting firms fuel record spending on the 2026 midterms

https://www.reuters.com/legal/legalindustry/new-kingmakers-crypto-ai-betting-firms-fuel-record-sp...
1•pseudolus•18m ago•0 comments

FCC abolishes gigabit speed goal

https://arstechnica.com/tech-policy/2026/08/fcc-abolishes-gigabit-speed-goal-suggesting-it-is-unf...
3•jonbaer•18m ago•0 comments

Deadvlei, Nambia – The Dark, the Dead, and the Desert

https://www.maloriesadventures.com/blog/deadvlei-nambia-the-dark-the-dead-and-the-desert/
1•thunderbong•19m ago•0 comments

Why Haven't the Voyager Spacecraft Ever Been Hacked?

https://lowendbox.com/blog/why-havent-the-voyager-spacecraft-ever-been-hacked/
1•shaunpud•21m ago•0 comments

Show HN: A directory of the best tweets available on twitter. hand-picked. no AI

https://billiondollartweets.com/
1•apsinghdev•21m ago•1 comments

We Stopped Counting Tokens

https://medium.com/super/we-stopped-counting-tokens-9278fbccadbc
1•herbertl•25m ago•0 comments

Hopf Spherical Compression and Quantization in C++23

https://github.com/meridionalissoftware/hscq
2•rfgplk•27m ago•1 comments

Show HN: Sutra – iOS e-books and comic reader with Calibre, OPDS and WebDAV sync

https://sutra-reader.com/index.html
1•darkusnitus•28m ago•0 comments

AI didn't erase the junior engineer's value, it increased it it

https://franciscotrindade.me/blog/the-kids-are-really-alright/
17•franciscomt•28m ago•5 comments

A better way to view diffs

https://charwise.vercel.app/
2•rpst•34m ago•2 comments

NASA calls off mission to rescue Swift gamma-ray observatory

https://arstechnica.com/space/2026/08/nasa-calls-off-mission-to-rescue-swift-gamma-ray-observatory/
2•pavel_lishin•34m ago•0 comments