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/

Show HN: Hermex – Drive ChatGPT and Gemini from Python via the Free Web UI

https://github.com/pseudo-usama/hermex
1•pseudo-usama•16s ago•0 comments

Threats against politicians skyrocket on meta

https://www.wired.com/story/threats-against-politicians-skyrocketed-after-meta-changed-its-speech...
1•jfyi•3m ago•0 comments

US publishers tell Common Crawl to stop scraping and delete archive

https://pressgazette.co.uk/media_law/common-crawl-ai-news-publishers-scraping-cease-and-desist-le...
1•thm•3m ago•0 comments

Rcarmo/womprat: A single-binary Windows client to access machines on a tailnet

https://github.com/rcarmo/womprat
1•rcarmo•6m ago•0 comments

Ukraine Is Not Losing. Russia Is Not Winning

https://www.theatlantic.com/ideas/2026/06/ukraine-war-momentum-shift/687444/
3•breve•7m ago•0 comments

Tests suggest Russian satellites can jam GPS on a continental scale

https://arstechnica.com/space/2026/06/tests-suggest-russian-satellites-can-jam-gps-on-a-continent...
1•kyrofa•7m ago•0 comments

The World Ransomware

https://www.lampysecurity.com/post/inside-the-world-ransomware
1•lampysecurity•8m ago•0 comments

State of DDoS 2026 – Attack trends, vectors, and mitigation data

https://flowtriq.com/state-of-ddos
1•jacob_masse•10m ago•0 comments

Closing the security gap in space systems

https://blog.satsearch.co/2026-06-09-spotlight-closing-the-security-gap-in-space-systems-with-terma
1•kartikkumar•11m ago•0 comments

Ask HN: Will you invest in SpaceX IPO?

2•roschdal•11m ago•4 comments

Agentic surface area as an operating metric

https://arizenai.com/agentic-surface-area/
1•arizen•11m ago•0 comments

Albania Is Not for Sale: Kushner's $4B Resort Triggers'Flamingo Revolution'

https://www.yacnews.com/albania-is-not-for-sale-kushners-4-billion-resort-triggers-flamingo-revol...
3•ortr•13m ago•0 comments

Accelerating Feed-Forward Networks for Disaggregated AI Inference

https://www.d-matrix.ai/how-accelerating-feed-forward-networks-in-disaggregated-inference-pipelin...
1•berlianta•14m ago•0 comments

Pythia 1.4B reproduces 3.6% of training samples verbatim given 950-token prompts

https://www.ret2libc.com/posts/Data-Extraction-Lab1/
1•werew•14m ago•0 comments

Subarr – a queue and coverage GUI for the Subgen/Bazarr subtitle stack

https://github.com/coaxk/subarr
1•gbh•15m ago•0 comments

Ask HN: Are you also experiencing issues with Azure Redis in Western Europe?

2•fpereiro•15m ago•0 comments

Ubuntu 24.04/26.04 Nginx Security Update Breaks Many Dynamic Modules

https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/2155992
1•EgoProblem•16m ago•0 comments

OpenLoomi: SOTA Holistic Context Graph for AI Agents

https://github.com/melandlabs/openloomi
1•peefy•16m ago•0 comments

Slangify: The Case for DSLs in LLM Workflows

https://slangify.org/where
2•librasteve•17m ago•1 comments

A free diagnostic for the Claude Certified Architect exam

https://www.claudecertifiedarchitects.com/
1•jockorules•18m ago•0 comments

Lovable Cloud: Expensive and Opaque at Scale

https://hal9.com/articles/lovable-cloud-expensive-and-opaque-at-scale
1•javierluraschi•18m ago•0 comments

Lovable says it has hit $500M in annualized revenue

https://techcrunch.com/2026/06/09/lovable-says-it-has-hit-500m-in-annualized-revenue-with-1-milli...
2•parveshblogger•18m ago•0 comments

Show HN: HN Debrief – A daily digest of the best HN comment threads

https://hndebrief.com/2026-06-08
2•nitekode•18m ago•0 comments

Ask HN: Why was my Show HN flagged?

2•andreygrehov•19m ago•4 comments

Moving data around still sucks

https://www.counting-stuff.com/moving-data-around-still-sucks/
1•speckx•20m ago•0 comments

Upstart chipmakers keep challenging Nvidia

https://www.cnbc.com/2026/06/09/nvidia-d-matrix-chip-production-microsoft.html
1•leopoldj•22m ago•0 comments

KaOS Takes Final Init Step Away from System with Dinit RC ISO

https://linuxiac.com/kaos-takes-final-init-step-away-from-systemd-with-dinit-rc-iso/
1•peter_d_sherman•22m ago•1 comments

Show HN: Bitemap – See where everyone would bite a sandwich

https://www.bitemap.food/sandwich/mcdonalds-cheeseburger-3862dc92
1•adsigel•23m ago•0 comments

Show HN: World Cup 2026 Sweepstake Generator with a fair-draw algorithm

https://worldcupsweepstakegenerator.com/
1•dongking•24m ago•0 comments

Designing High-Impact Mobile Ethnography Studies

https://zenodo.org/records/20611747
1•anasteciadunu•24m ago•0 comments