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/

Materials innovation has a scale-up problem, not discovery

https://www.atomscale.ai/updates/our-thesis-atom-to-scale
1•groznyj•1m ago•0 comments

Tech workers in 2026: a workforce splitting in two

https://www.lennysnewsletter.com/p/how-tech-workers-are-feeling-in-2026
1•samspenc•3m ago•0 comments

Trace: Stripe Radar for autonomous AI agents (Sybil fraud reduced by 86%)

https://trace-api-ixv6o.ondigitalocean.app/api/portal/webhook
2•nikunjkaushik20•4m ago•0 comments

Inviting Hard Questions

https://www.anthropic.com/news/hard-questions
1•yurivish•4m ago•0 comments

Would you use an app that picks your best card based on where you're?

https://cardneuro.com/
1•AmiPatel•6m ago•0 comments

Father fixes dead RTX 3070 with a jerry-rigged capacitor from an old radio

https://www.tomshardware.com/pc-components/gpus/ingenious-father-fixes-dead-rtx-3070-with-a-jerry...
1•speckx•6m ago•0 comments

Fresh: A powerful terminal text editor and IDE

https://getfresh.dev/
1•thunderbong•10m ago•0 comments

An orbiting disco ball gave Einstein's theory its most precise test yet

https://arstechnica.com/science/2026/07/an-orbiting-disco-ball-gave-einsteins-theory-its-most-pre...
1•lisper•12m ago•0 comments

He Wanted to Track Microplastics in the Sea. The EPA Fired Him

https://www.nytimes.com/2026/07/10/climate/fish-farm-microplastics-maha-epa-firing.html
3•zzzeek•13m ago•1 comments

Show HN: Local Motion – Use Cursor Agents and Chat with a Local LLM

https://github.com/mattmireles/local-motion
1•MediaSquirrel•14m ago•0 comments

Oneko

https://github.com/glreno/oneko
2•soupspaces•15m ago•0 comments

How the Terrorist Group Boko Haram Uses Frontier AI

https://casp.ac/reports/ai-enabled-terrorism
2•imustachyou•15m ago•0 comments

The Upgrade That Made My AI Agent Worse

https://medium.com/@alanscottencinas/the-upgrade-that-made-my-ai-agent-worse-610fa6ebe2d4
1•encinas88•16m ago•0 comments

What are the AI folks up to these days?

https://12gramsofcarbon.com/p/agentics-what-are-the-ai-folks-up
1•theahura•16m ago•0 comments

The end of consumer AI winter

https://jonready.com/blog/posts/the-end-of-consumer-ai-winter.html
2•mips_avatar•18m ago•1 comments

Commenting on the semi-annual reporting comment letters

https://www.businesslawprofessors.com/2026/07/commenting-on-the-comment-letters/
1•petethomas•23m ago•0 comments

Native SDK – Toolkit for building native desktop apps

https://native-sdk.dev/
2•gempir•23m ago•0 comments

45% of Enthusiasts 'Seriously Considering' Leaving Sony for PC

https://www.pushsquare.com/news/2026/07/ps5-has-put-a-dampener-on-gaming-45percent-of-enthusiasts...
3•speckx•24m ago•0 comments

Auburn California Flock Surveillance Cameras Stolen and Dumped in a Canal

https://www.gadgetreview.com/auburn-california-flock-surveillance-cameras-stolen-and-dumped-in-a-...
3•01-_-•25m ago•0 comments

LinkedIn and X Are Flooded with AI Spam, Browsing Data Suggests

https://www.404media.co/linkedin-and-x-are-flooded-with-ai-spam-browsing-data-suggests/
1•01-_-•26m ago•1 comments

AI-generated papers scored well in ACL peer review, undisclosed to reviewers [pdf]

https://www.apexin.ai/assets/papers/apex-research-2026.pdf
1•bannedcontra•27m ago•0 comments

Bacteria turn dissolved uranium into stable compound in 130 days

https://phys.org/news/2026-07-bacteria-dissolved-uranium-stable-compound.html
3•ivell•27m ago•0 comments

LG and Alienware monitors caught auto-installing Windows adware

https://www.techspot.com/news/113031-lg-alienware-monitors-caught-auto-installing-windows-adware....
1•MasterYoda•29m ago•0 comments

Making history China lands rocket during an orbital launch for first time

https://www.space.com/space-exploration/launches-spacecraft/making-history-china-lands-rocket-dur...
5•yogthos•32m ago•1 comments

What is momentum?(joke video) (2021)

https://www.youtube.com/watch?v=jm7jVi8akcc
1•num42•34m ago•0 comments

Soulless – List of AI Artists Hiding on Spotify

https://soullessmusic.com/
2•ChrisArchitect•35m ago•0 comments

Blanks – Why do some books contain blank pages? (2016)

https://rhollick.wordpress.com/2016/03/01/blanks/
2•gurjeet•35m ago•0 comments

GPT-5.6 Sol Ultra produces proof of the Cycle Double Cover Conjecture [pdf]

https://cdn.openai.com/pdf/04d1d1e4-bc75-476a-97cf-49055cd98d31/cdc_proof.pdf
21•scrlk•36m ago•1 comments

The Future Worth Building Is Human

https://thinkingmachines.ai/blog/the-future-worth-building-is-human/
2•ot•37m ago•0 comments

Navigating the 47-Day SSL/TLS Certificate Validity Era

https://www.globalsign.com/en/blog/navigating-the-47-day-ssl-tls-certificate-validity-era
1•mooreds•38m ago•0 comments