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/

DWCS: Why I Open-Sourced My Game Infrastructure Early

https://medium.com/@www.ahadprogamer/i-built-an-open-source-multiplayer-backend-for-a-vr-game-tha...
1•Ahadprogamer•1m ago•0 comments

Extinction Rebellion pelt Microsoft Dutch data center site with acid balloons

https://www.datacenterdynamics.com/en/news/extinction-rebellion-pelts-microsoft-data-center-site-...
1•giuliomagnifico•1m ago•0 comments

Marvell Brings Radix, Low Latency, and Bandwidth to Bear with Teralynx T100

https://www.nextplatform.com/connect/2026/07/17/marvell-brings-radix-low-latency-and-bandwidth-to...
1•rbanffy•1m ago•0 comments

Wharton and Harvard Business School: LLMs on business decisions and tasks

https://business-ai-benchmark.github.io/
1•patelajay285•3m ago•0 comments

Show HN: RefundHalt, contest App Store and Google Play refunds automatically

https://refundhalt.com
1•kedv•5m ago•0 comments

Major AI models are likely to refuse criticizing restrictive leaders or govts

https://apnews.com/article/artificial-intelligence-chatbots-censorship-bias-free-speech-fed8fdbf9...
1•smurda•7m ago•0 comments

Why is it so hard for the U.S. to win wars?

https://www.npr.org/2026/07/18/g-s1-134037/why-is-it-so-hard-for-the-u-s-to-win-wars
2•rbanffy•9m ago•0 comments

India's first privately-developed rocket reaches orbit on dramatic debut launch

https://arstechnica.com/space/2026/07/indias-first-privately-developed-rocket-reaches-orbit-on-dr...
1•rbanffy•12m ago•0 comments

Show HN: I built a pinball repair tool grounded in the real service manuals

https://joinflipside.com.au/repair/
1•mcpit•14m ago•0 comments

Understanding Go AI Inference: What Is Inference?

https://internals-for-interns.com/posts/go-ai-inference-what-is-inference/
1•valyala•14m ago•0 comments

Commission fines AliExpress €550M for breaching the Digital Services Act

https://digital-strategy.ec.europa.eu/en/news/commission-fines-aliexpress-eu550-million-breaching...
2•robin_reala•19m ago•0 comments

Show HN: Diagraw-draw AWS/GCP/IBM archs with icons, arrows that stay attached

https://diagraw.com/
1•victoragudo•19m ago•0 comments

Alibaba Fined Record €550M by EU for Illegal Sales

https://www.bloomberg.com/news/articles/2026-07-20/alibaba-fined-550-million-for-illegal-sales-in...
3•technewssss•20m ago•0 comments

Ask HN: What would a Python-first web look like?

1•RS-232•21m ago•0 comments

DeepWaiting mindfulness while you wait

https://deepwaiting.xyz
1•Zeekaas•21m ago•0 comments

Coercion and Deception in AI-to-AI Management: An Agentic Benchmark

https://arxiv.org/abs/2607.15434
1•sbulaev•26m ago•0 comments

Lāhainā Noon in HawaiʻI: When and Where to See IT

https://www.lovebigisland.com/hawaii-blog/lahaina-noon-when-and-where/
1•_tk_•27m ago•0 comments

Who's Afraid of Chinese Models?

https://stratechery.com/2026/whos-afraid-of-chinese-models/
2•mfiguiere•28m ago•0 comments

Show HN: Picnic Host – No fuss static website hosting

https://picnic.host/en/index.html
1•jeremysarchet•28m ago•0 comments

AI is more likely than humans to form biases when hiring

https://www.technologyreview.com/2026/07/20/1140655/ai-biases-hiring-humans/
2•joozio•32m ago•0 comments

EU slaps €550M fine on AliExpress over illegal and counterfeit goods

https://www.euronews.com/my-europe/2026/07/20/eu-slaps-550-million-fine-on-aliexpress-over-illega...
2•muxamilian•33m ago•0 comments

Show HN: Hail.so – Open-source phone, SMS and email for agents and humans, v0.15

https://github.com/hail-hq/hail/
1•r13i•38m ago•1 comments

Mid-tier factory EDC knives worth buying?

https://www.paragon-knives.com/
1•bgzlsxaz•39m ago•0 comments

Show HN: Test harness that found +250 bugs in open-source matching engines

https://github.com/flash1-dev/matching-engine-benchmark
1•roycechocolate•39m ago•0 comments

Reporting Web 3D Capabilities on a Budget of $3 a Month

https://ben3d.ca/blog/reporting-web-3d-capabilities-on-a-budget
1•bhouston•40m ago•0 comments

About AgentRQ – Human-in-loop realtime conversational task manager for AI Agents

https://github.com/agentrq/agentrq
1•shahargl•43m ago•0 comments

Minimal Git CI using hooks

https://mccd.space/posts/26-06-29/simple-git-ci
2•olexsmir•43m ago•0 comments

Show HN: A comprehensive, filterable list of AI agent jails

https://pleasedonotescape.com/
4•petesergeant•44m ago•1 comments

Human mathematicians are being outcounterexampled

https://xenaproject.wordpress.com/2026/07/20/human-mathematicians-are-being-outcounterexampled/
2•vitplister•45m ago•0 comments

Nightborne – A Neill Blomkamp Sci-Fi Film. AI (4K) [video]

https://www.youtube.com/watch?v=8Wbtt2JxP7g
1•mxfh•48m ago•0 comments