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/

Anthropic's IPO Prospectus Is a Fucking Doozy

https://daringfireball.net/linked/2026/09/30/reuters-anthropic-ipo-prospectus
1•danaris•2m ago•0 comments

Branch Target Reuse, BTR: New Spectre V2 Attack Targeting JIT Compilers

https://www.phoronix.com/news/Branch-Target-Reuse-BTR
1•porridgeraisin•4m ago•0 comments

More screen time is linked to poorer child development, study shows

https://www.cnn.com/2026/09/30/health/children-screen-time-study-scli-intl-wellness
1•smoyer•5m ago•0 comments

How to hack your partners WhatsApp

1•lucasgrinvall•7m ago•0 comments

Vulnerability disclosures double to 10k per month as AI fuels exploitation

https://therecord.media/google-vulnerabilities-cyberattacks-ai
1•speckx•9m ago•0 comments

What is happening in Kyiv. A drone strike near my University [video]

https://www.youtube.com/watch?v=HmSHgjNYj7w
1•consumer451•9m ago•0 comments

Aurora PostgreSQL now supports querying of Apache Iceberg and Parquet data

https://aws.amazon.com/about-aws/whats-new/2026/09/aurora-postgresql-query-apache-iceberg-and-par...
3•daigoba66•9m ago•0 comments

Numerai: Architect an AI scientist to predict the stock market

https://numer.ai/
1•filipstefano•10m ago•0 comments

Show HN: Perspica – A semantic diff for reviewing code

https://github.com/sshah03/perspica
1•sshah03•12m ago•0 comments

India restores ancient water systems (stepwells)

https://www.bbc.com/future/article/20260820-india-is-turning-to-ancient-water-systems-as-modern-o...
2•alentred•12m ago•0 comments

Gemini 4 Argon is here Looks amazing

https://twitter.com/GoogleAI/status/2105388478683119904
1•ltononro•13m ago•2 comments

Sadistic, Blatant, and Wanton: A Brief History of US Impunity from War Crimes

https://www.bostonreview.net/articles/sadistic-blatant-and-wanton/
1•paimapi•13m ago•0 comments

Gitea 28.0.0 Is Released

https://blog.gitea.com/release-of-28.0.0/
1•porridgeraisin•14m ago•0 comments

Show HN: CLI and TUI control for dps150 power supply

https://github.com/hmldns/dps150ctl
1•Homo__Ludens•15m ago•0 comments

Senate Democrats block bill to limit lawmakers' stock trades, citing voter ID

https://www.cbsnews.com/news/senate-stock-trading-voter-id-bill-democrats-block/
2•mc32•16m ago•0 comments

Google Grapples with Employee Skepticism About New Gemini Model

https://www.bloomberg.com/news/articles/2026-09-30/google-grapples-with-employee-skepticism-about...
1•merksittich•16m ago•0 comments

Show HN : Colour Picker for windows

https://apps.microsoft.com/detail/9nq8fv9dfq4v?hl=en-US&gl=US
1•brightertools•16m ago•0 comments

TalkScribe – On-device dictation and local LLM rewrite for macOS

https://talkscribe.app
1•jusef•17m ago•0 comments

Would you let AI agents into production?

https://incident-arena.com/
1•onnies•19m ago•0 comments

Show HN: EtherPK – a notes app where any concept is a Kanban Board (from tasks)

https://blog.etherpk.com/any-concept-can-be-a-kanban-board
1•gb2d_hn•20m ago•0 comments

We used a database as a message queue. Now we use Kafka

https://www.tigrisdata.com/blog/quick-fdb-kafka/
3•bootlegbilly•21m ago•0 comments

A better path for AI with Max Tegmark

https://www.youtube.com/watch?v=C-pWm59Oyqg
1•marojejian•22m ago•1 comments

Turn one question into a branching map of ideas with AI

https://www.echohive.ai/drift
1•echohive42•22m ago•0 comments

Factory AI vs. Cognition (Devin) board tussle

1•pranshuchittora•22m ago•0 comments

Ask HN: How should MLE navigate career in today's industry?

1•throwaway123198•23m ago•0 comments

Bi-directional Typing – Conor McBride [video]

https://www.youtube.com/watch?v=mLoEgiiFFc8
1•matt_d•25m ago•0 comments

How to Hack WhatsApp and Telegram

1•lucasgrinvall•26m ago•0 comments

America.gov AI Easter Egg? Type "play minecraft"

https://www.facebook.com/AnthonyDavidAdams/posts/breaking-head-over-to-america-gov-and-type-play-...
1•ada1981•28m ago•3 comments

Show HN: termkick – a simple, no-clutter native macOS SSH client

https://products.n0agi.com/termkick/
2•N0AGI•28m ago•0 comments

Reasons to Use MyDef

https://github.com/hzhou/MyDef/blob/master/docs/Reasons.md
1•hzhou321•30m ago•0 comments