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/

"I loved every minute of it, however hard it had been" [video]

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

OpenAI's ring-shaped smart speaker will reportedly cost between $300 and $400

https://www.engadget.com/2232108/openai-s-ring-shaped-smart-speaker-will-reportedly-cost-between-...
1•prng2021•7m ago•1 comments

Patient Zero (you can hug faces with cyber arms)

https://lokley.substack.com/p/patient-zero
1•loopscrollgame•8m ago•0 comments

The Schwarzschild Metric: Complete Derivation – General Relativity [video]

https://www.youtube.com/watch?v=6cSYZMM0wU4
1•binyu•11m ago•0 comments

VCS Friendly Scene Diffs in Godot 4.8

https://godotengine.org/article/dev-snapshot-godot-4-8-dev-2/#core-write-object-variants-with-n-b...
1•BinRoo•12m ago•0 comments

Snapline – menu-bar screenshot app that searches shots by their text

https://snap-line.app/
2•ziadeh•12m ago•0 comments

Blasting the Air in Front of Hypersonic Vehicles with Lasers Reduces Drag

https://www.twz.com/33859/blasting-the-air-in-front-of-hypersonic-vehicles-with-lasers-could-unlo...
1•delichon•18m ago•0 comments

How I released a game that has no assets [video]

https://www.youtube.com/watch?v=Qr3VsZYQy4s
1•EspadaV9•20m ago•1 comments

tla-rs: IronFleet and AutoMan in Verus

https://github.com/stonysystems/tla-rs
1•matt_d•21m ago•0 comments

Introducing Dogwood: runtime verification for AI agents

https://aws.amazon.com/blogs/opensource/introducing-dogwood-runtime-verification-for-ai-agents/
1•matt_d•22m ago•0 comments

Data Science Weekly – Issue 663

https://datascienceweekly.substack.com/p/data-science-weekly-issue-663
1•sebg•24m ago•0 comments

PyTorch Tutorial for Deep Learning – The JetBrains Blog

https://blog.jetbrains.com/pycharm/2026/07/pytorch-tutorial-for-deep-learning/
1•rbanffy•24m ago•0 comments

Cloudflare Announces Second Quarter 2026 Financial Results

https://cloudflare.net/news/news-details/2026/Cloudflare-Announces-Second-Quarter-2026-Financial-...
1•TheqO•25m ago•0 comments

OpenAI and four rivals just agreed on one standard for AI agents

https://thenextweb.com/news/openai-agent-plugins-open-standard-skills-mcp
4•FireBeyond•25m ago•0 comments

South Korea province deploys drones to warn elderly farmers amid heatwave

https://www.reuters.com/business/environment/south-korea-province-deploys-drones-warn-elderly-far...
1•petethomas•25m ago•0 comments

Rise of the $100 Hot Dog

https://www.wsj.com/arts-culture/food-cooking/the-rise-of-the-100-hot-dog-2ac6f322
2•bcaulfield•28m ago•1 comments

The Race to Come Up with the Next Big Sleep Drug

https://www.wsj.com/health/pharma/the-race-to-come-up-with-the-next-big-sleep-drug-473a4a5e
1•bookofjoe•28m ago•1 comments

New York Has Sued Kalshi for Running Illegal Gambling Operation

https://ag.ny.gov/press-release/2026/governor-hochul-and-attorney-general-james-announce-new-york...
2•cdrnsf•30m ago•0 comments

The messy politics behind Google's big AI shakeup

https://www.theverge.com/tech/976108/google-ai-leadership-shakeup-jeff-dean-demis-hassabis-deepmind
1•Anon84•31m ago•0 comments

BMS ran AI for drug discovery 3 years- what they found and why they doubled down

https://blogs.nvidia.com/blog/bristol-myers-squibb-building-life-science-industrys-most-advanced-...
1•bcaulfield•31m ago•0 comments

With software alone, one B200 beats the LPU and gets close to Cerebras

https://runinfra.ai/news/b200-beats-the-lpu
3•OsamaJaber•31m ago•0 comments

Why AI is a risk to Communist China

https://www.economist.com/leaders/2026/08/06/why-ai-is-a-risk-to-communist-china
2•petethomas•31m ago•0 comments

Several plaster noses hidden in plain sight around London's Soho neighborhood

https://www.atlasobscura.com/places/seven-noses-of-soho
1•bcaulfield•31m ago•0 comments

Google shifts AI power back to Brin as DeepMind's Hassabis steps aside

https://giftarticle.ft.com/giftarticle/actions/redeem/1313659c-650d-45f9-9f81-f9f18a7f8b69
1•nmstoker•33m ago•0 comments

Kitesurf:The agent-first browser that runs in isolates on Cloudflare

https://blog.cloudflare.com/kitesurf/
2•cebert•38m ago•1 comments

AMA: MiniMax H3 Team – Ask anything about open video generation model

https://old.reddit.com/r/StableDiffusion/comments/1vh9rtw/ama_minimax_h3_team_ask_us_anything_abo...
1•embedding-shape•40m ago•0 comments

Metabase: Unauthenticated SQL injection in password reset (CVSS 10.0)

https://github.com/metabase/metabase/security/advisories/GHSA-vwf4-m7j8-wcjf
3•thejosh•44m ago•1 comments

Beyond the Library: An Agentic Framework for Autoformalizing Research Math

https://arxiv.org/abs/2606.31134
1•matt_d•45m ago•0 comments

Atari Legacy Magazine – By Paul Lefebvre

https://www.goto10retro.com/p/atari-legacy-magazine
1•rbanffy•45m ago•0 comments

MFLUSIVA

https://www.modernatx.com/ir-insights-mflusiva
1•jawns•46m ago•0 comments