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/

BCG immunotherapy reprograms CNS immunity and alters Alzheimer's biomarkers

https://www.nature.com/articles/s43856-026-01691-7
1•bookofjoe•1m ago•0 comments

Rust Coreutils Cp Ended Up Breaking Ubuntu Image Builds with Incompatibility

https://www.phoronix.com/news/Rust-Coreutils-cp-Ubuntu-Images
1•Bender•1m ago•0 comments

Google loses fight against record €4.1B EU antitrust fine

https://www.reuters.com/world/eu-top-court-dismisses-google-fight-against-record-41-billion-eu-an...
1•1vuio0pswjnm7•2m ago•0 comments

The Information Theory Behind Why AI Writing Sucks

https://www.pangram.com/blog/joe-stech-information-theory-why-ai-writing-sucks
1•malshe•2m ago•0 comments

Show HN: I built a map to visualize the walkable area from any location

https://emanant.app
1•parcl0•3m ago•0 comments

Alibaba bans staff from using Claude Code over Anthropic spyware concerns

https://www.scmp.com/tech/big-tech/article/3359375/alibaba-bans-staff-using-claude-code-over-anth...
1•dstala•6m ago•0 comments

Iberdrola kicks off its first large-scale battery project in the US

https://electrek.co/2026/07/02/iberdrola-kicks-off-its-first-large-scale-battery-project-in-the-us/
1•Bender•7m ago•0 comments

Recall of potato chips upgraded to highest level reasonable probability of death

https://www.dailymail.com/health/article-15950863/Utz-potato-chips-recall-salmonella-contaminatio...
2•Bender•8m ago•0 comments

Andy Burnham Here – AMA

https://old.reddit.com/r/ukpolitics/comments/1uls1lw/andy_burnham_here_ama/
2•MrsPeaches•9m ago•0 comments

Show HN: U.S. Declaration of Independence but as Google Doc Version History

https://declaration.docs.willmeye.rs
1•willmeyers•10m ago•0 comments

Dial Town

https://jamiedolan.com/Dial-Town/
1•rrotaru•11m ago•0 comments

US residents angry datacenters 'shoved down our throats' are recalling officials

https://www.theguardian.com/us-news/2026/jul/03/datacenter-recall-elections
2•beardyw•12m ago•0 comments

The pandemic of incomplete OpenSSL error handling

https://blog.jak-linux.org/2026/07/03/openssl-pandemic/
1•julian-klode•13m ago•0 comments

FiberFS Technical Overview

https://fiberfs.io/content/fiberfs_technical_overview
1•nyc_pizzadev•13m ago•0 comments

Trump has made more than $1B from crypto in a year

https://theconversation.com/trump-has-made-more-than-1-billion-from-crypto-in-a-year-how-286635
2•thisislife2•14m ago•0 comments

CVV Checker – Real-time card verification via zero-dollar bank auth

https://cvvchecker.org
1•hurtzbergcc•15m ago•0 comments

Meirro Pro Display, 32" 6K Retina-class, Full Aluminum, anyone heard of them?

https://www.meirro.com
1•lisovin•17m ago•1 comments

Skillsaw: Lints the files that steer your AI coding agents

https://skillsaw.org/
2•sea-gold•19m ago•0 comments

Codex Agents Built and Operate My Weapons Research

https://weaponsofconflict.com/blog/codex-agents-weaponsofconflict-experiment
1•Politely1527•23m ago•0 comments

The feature in OxCaml that more languages should steal

https://theconsensus.dev/p/2026/06/27/the-feature-in-oxcaml-more-languages-should-steal.html
1•eatonphil•24m ago•0 comments

Show HN: Verbum Vitae – Bible memorization with spaced repetition

https://vvitae.com/
2•pseudocharles•25m ago•0 comments

Notion pulled itself back from the brink of failure (2019)

https://www.figma.com/blog/design-on-a-deadline-how-notion-pulled-itself-back-from-the-brink-of-f...
1•downbad_•26m ago•1 comments

Food for Agile Thought 551: AI Confidence Theater, We Tried Agile; Didn't Work

https://age-of-product.com/food-agile-thought-551-ai-confidence-theater/
2•swolpers•33m ago•0 comments

AdaptHealth says attackers stole patient data

https://www.theregister.com/security/2026/07/03/adapthealth-crooks-stole-our-passwords-patient-he...
1•Bender•36m ago•0 comments

2-Click Remote Code Execution in Meccha Chameleon

https://khaelkugler.com/blogs/meccha_chameleon.html
1•tester457•36m ago•0 comments

The Life and Times of Maxis, Part 1: SimEverything

https://www.filfre.net/2026/07/the-life-and-times-of-maxis-part-1-simeverything/
3•doppp•36m ago•0 comments

How the Summer of Atomic Bomb Testing Turned the Bikini into a Phenomenon

https://www.smithsonianmag.com/smithsonian-institution/how-wake-testing-atomic-bomb-bikini-became...
1•thunderbong•36m ago•1 comments

Ask HN: Possible issue impacting AWS Cloudwatch logs availability?

1•merek•37m ago•0 comments

Dev says Google warned him about account hijack then charged him $11,000 anyway

https://www.theregister.com/cyber-crime/2026/07/03/dev-says-google-warned-him-about-account-hijac...
2•Bender•38m ago•0 comments

Show HN: IDE for code assembly of reusable code blocks

https://tetrees.ai/download
1•joseph3553•38m ago•2 comments