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/

Graduating without a thesis: meet the people getting 'practical' PhDs in China

https://www.nature.com/articles/d41586-026-01242-z
1•sohkamyung•1m ago•0 comments

Fable is SOTA at CIFAR Speedrun: lessons on AI R&D automation

https://fulcrum.inc/2026/07/09/fable-cifar-speedrun.html
1•etherio•2m ago•0 comments

Gates Heir's Shopping App Took Credit for Sales It Didn't Drive

https://www.bloomberg.com/news/articles/2026-07-09/gates-heir-s-shopping-app-took-credit-for-sale...
1•toomuchtodo•4m ago•1 comments

Up the Stack: How AI's Escape from the Commodity Trap Risks Enterprise Lock-In

https://www.normaltech.ai/p/up-the-stack-how-ais-escape-from
1•randomwalker•10m ago•0 comments

What is your Cuck Level?

https://cucklevel.com/
1•pro_methe5•13m ago•0 comments

Orbit, an Open-Source Toolkit for Retrieval-Based Inference

https://github.com/schmitech/orbit
1•schmitech•14m ago•0 comments

When does a CEO get involved? When you're on your fourth Ford Focus

https://old.reddit.com/r/AskReddit/comments/1uru4d7/comment/owjp196/
3•0xWTF•15m ago•0 comments

How to Hide from Killer Drones

https://www.economist.com/science-and-technology/2026/07/08/how-to-hide-from-killer-drones
2•nmstoker•17m ago•0 comments

Ex-Epoch Times CFO pleads guilty in $67M multinational money laundering scheme

https://apnews.com/article/epoch-times-cfo-indictment-money-laundering-a015b35aaeae44284f0026dc10...
8•petethomas•18m ago•1 comments

People Who Will Thrive in the AI Age

https://www.theatlantic.com/ideas/2026/06/ai-open-ai-anthropic/687689/
1•davidklemke•19m ago•0 comments

New York Times says OpenAI hid evidence in ChatGPT copyright trial

https://techcrunch.com/2026/07/09/new-york-times-says-openai-hid-evidence-in-chatgpt-copyright-tr...
5•sbulaev•19m ago•0 comments

And Then the Billionaire Paid Off $550M of Our Debts for $5.5M

https://idiallo.com/blog/billionaire-paid-off-550-million-dollars-of-our-debts
3•firefoxd•20m ago•1 comments

Victor Marx wins Colorado's three-way Republican primary for governor

https://coloradosun.com/2026/07/09/victor-marx-wins-colorados-republican-primary-governor/
1•mooreds•20m ago•0 comments

GeForce Trading Cards: Series 1 Celebrates the Generations of GeForce

https://www.nvidia.com/en-us/geforce/news/geforce-trading-cards-series-1-summer-of-rtx-giveaways/
1•Jhsto•21m ago•0 comments

Show HN: Use Any Agent as an Orchestrator

https://github.com/backnotprop/orchestrator
2•ramoz•21m ago•0 comments

Seekable OCI: Lazy-Loading Container Images via Range-Request Indexing

https://arxiv.org/abs/2607.06868
1•Jimmc414•21m ago•0 comments

Academia and the "AI Brain Drain"

https://www.schneier.com/blog/archives/2026/03/academia-and-the-ai-brain-drain.html
1•JumpCrisscross•23m ago•0 comments

The weirdest things that mess up wi-fi – and how to improve your signal

https://www.bbc.com/future/article/20260708-the-weirdest-things-that-mess-up-your-wifi
4•billybuckwheat•23m ago•0 comments

Nobel-Winning U.S. Chemist Will Move to China to Lead A.I. Institute

https://www.nytimes.com/2026/07/09/science/nobel-winning-us-chemist-will-move-to-china-to-lead-ai...
4•metanoia_•23m ago•0 comments

Coding Glasses for AI Agents – Even G2 Terminal Mode

https://www.evenrealities.com/terminal
1•h14h•24m ago•1 comments

What It's Like to Suddenly Start Completely Believing in God [2022]

https://lydialaurenson.substack.com/p/what-its-like-to-suddenly-start-completely-believing-in-god
2•bookofjoe•25m ago•1 comments

Memory Scarcity, Open Models, and the Restructuring of the AI Industry

https://arxiv.org/abs/2607.07207
1•Jimmc414•26m ago•0 comments

Weapon Systems Annual Assessment

https://www.gao.gov/products/gao-26-108457
2•Jimmc414•26m ago•0 comments

World-First 'Super Alloy' Could Transform the Way Metals Are Made

https://www.sciencealert.com/world-first-super-alloy-could-transform-the-way-metals-are-made
5•tejohnso•27m ago•1 comments

California universities stockpiling AR-15s, grenades and submachine guns

https://www.theguardian.com/us-news/2026/jul/09/california-universities-military-equipment
6•sizzle•28m ago•2 comments

Fable Ban and Reversal Exposed We Cant Measure AI Cyber Risk in Real World

https://orionpolicy.org/washingtons-ai-ban-and-reversal-exposed-the-bigger-problem-it-cant-measur...
1•delschlangen•29m ago•0 comments

Lessons from CISA's Cyber Incident

https://www.cisa.gov/news-events/news/lessons-cisas-cyber-incident
2•guedou•29m ago•0 comments

Why American ambulance rides are so expensive

https://davidoks.blog/p/why-american-ambulance-rides-are
7•jyunwai•32m ago•1 comments

Patreon Blocks Crawlers from Stealing Creators' Work for AI Training

https://www.404media.co/patreon-cloudflare-partnership-ai-crawlers/
4•cdrnsf•33m ago•0 comments

An off switch for dual-use knowledge in AI models

https://www.anthropic.com/research/off-switch-dual-use
3•DeveloperErrata•33m ago•1 comments