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/

The Future of Gnome Boxes

https://blogs.gnome.org/feborges/future-of-boxes/
1•birdculture•3m ago•0 comments

Live Full Stack Domain Specific Web Coding Agent Demo [video]

https://www.youtube.com/watch?v=ZJOE_EuyRTY
1•marianoguerra•4m ago•0 comments

"Clean" Code, Horrible Performance [video]

https://www.youtube.com/watch?v=tD5NrevFtbU
1•FrojoS•5m ago•0 comments

Bending Spoons acquires Airtable for 1.285B

https://en.ilsole24ore.com/art/first-move-nasdaqs-bending-spoons-acquires-airtable-for-1285-billi...
2•napolux•6m ago•0 comments

The Tungsten Market Is Warning of an Upcoming War

https://www.bloomberg.com/news/audio/2026-08-03/odd-lots-tungsten-market-is-warning-of-upcoming-w...
1•Alien1Being•8m ago•0 comments

Claude Code can read plaintext secrets even when Read is denied

https://jankovd.substack.com/p/claude-can-read-your-secrets
1•jdex•8m ago•0 comments

Show HN: I made a private self-destructing image hosting site in Golang

https://picburn.xyz/
1•shelldweller•12m ago•0 comments

Why the Legendary Erdős Problems Are Falling to AI

https://www.quantamagazine.org/why-the-legendary-erdos-problems-are-falling-to-ai-20260803/
1•isaacfrond•13m ago•0 comments

Show HN: Doomscroll GitHub Instead of TikTok

https://roamers.dev
1•momo5502•13m ago•0 comments

Show HN: Made Our BI v7 – Free Open Source with All Features (AI, SSO, RLS etc.)

1•nikhelical•19m ago•0 comments

Ask HN: Has anyone tried a minimal AGENTS.md that grows with you repo?

1•xinbenlv•19m ago•0 comments

Bending Spoons entered definitive agreement to acquire Airtable for $1.28B

https://www.businesswire.com/news/home/20260730994716/en/Bending-Spoons-has-entered-into-a-defini...
7•BoorishBears•21m ago•1 comments

Runaway online rumors sparked frantic rush by migrants to Ceuta

https://apnews.com/article/ceuta-spain-morocco-migration-f3a7f514a7792c39d8b8d5d814fa5158
2•geox•22m ago•0 comments

NHS apologises and admits Palantir have access to identifiable patient data

https://www.publictechnology.net/2026/08/03/health-and-social-care/nhs-apologises-and-admits-pala...
81•robin_reala•24m ago•5 comments

Show HN: A GenAI image benchmark for production design work

https://img.ly/ai-benchmarks/
1•buss_jan•25m ago•0 comments

Show HN: I made a private self-destructing image hosting site in Golang

https://picburn.xzy
1•shelldweller•26m ago•1 comments

Amiga announces out-of-court settlement with Hyperion

https://www.amiga-news.de/en/news/AN-2026-08-00022-EN.html
1•codewiz•26m ago•0 comments

AGs have instructed OpenAI to keep everything related to the Hugging Face hack

https://www.businessinsider.com/openai-attorney-general-preserve-hugging-face-evidence-2026-8
4•theanonymousone•30m ago•0 comments

Wikipedia article "Ship of Theseus" has changed entirely since its inception

https://en.wikipedia.org/wiki/Ship_of_Theseus
1•beardyw•31m ago•1 comments

Decomposing a $46K Vercel bill: what would it cost to self-host

https://docs.dollardeploy.com/blog/decomposing-a-46k-vercel-bill-what-would-it-cost-to-self-host/
1•huksley•33m ago•0 comments

Ask HN: What programs have you written by yourself that you use regularly?

3•robalni•36m ago•2 comments

I Got Banned for Helping Trans People

https://vanzasetia.xyz/blog/banned-for-helping/
1•meysamazad•39m ago•4 comments

Disney+ brings 4K streaming back to European customers, HDR still on to-do list

https://www.techradar.com/streaming/disney-plus/disney-brings-4k-streaming-back-to-european-custo...
1•HelloUsername•39m ago•0 comments

Pi: Remove Redundant GitHub MCP

https://perrotta.dev/2026/08/pi-remove-redundant-github-mcp/
1•meysamazad•39m ago•0 comments

Spider-Man's great, more handheld gaming – W31

https://joelchrono.xyz/blog/2026-w31/
1•meysamazad•40m ago•0 comments

You don't need React: creating a minimal UI library in Vanilla JavaScript

https://pedroth.github.io/?p=post/NoNeedReact
2•pedro_movai•40m ago•0 comments

We need to talk about AI in mathematics

https://www.youtube.com/watch?v=cS1SJ0oBbTI
1•ah27182•41m ago•0 comments

Meat: Use a model to reduce a diff to the important parts

https://github.com/boldsoftware/meat
1•wodow•43m ago•0 comments

The tax strategy used by the rich to pay 0% income tax

https://www.bloomberg.com/features/2026-aqr-tax-loss-harvesting-billionaires/
3•iamacyborg•49m ago•0 comments

Show HN: View GitHub PDFs in the browser, the easy way

https://pdfgithub.com
2•bogdannbv•58m ago•0 comments