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/

Schools installing pepper-spraying drones to help stop active school shooters

https://abc7.com/post/campus-guardian-angel-drones-american-schools-install-pepper-spraying-mithr...
1•lxm•27s ago•0 comments

How to spot overlapping subproblems before you start coding DP

https://leetcopilot.dev/blog/how-to-spot-overlapping-subproblems-before-writing-dp
1•alexwang24•44s ago•0 comments

How we made a viral commercial for developers

https://blog.railway.com/p/how-to-make-viral-commercial
1•dban•4m ago•1 comments

World Models Are AI's Next Frontier

https://time.com/article/2026/07/15/world-models-are-ai-s-next-frontier/
1•Gooblebrai•7m ago•0 comments

Coal back in favour as US plant bidding war highlights rising demand to power AI

https://www.ft.com/content/babf4c89-1a6f-447f-a17e-7e3e48f359b8
2•JumpCrisscross•7m ago•0 comments

Reaping the Whirlwind: Inside the Potomac River Midair Collision

https://admiralcloudberg.medium.com/reaping-the-whirlwind-inside-the-potomac-river-midair-collisi...
1•kraussvonespy•8m ago•0 comments

Deliberate indifference: NY state put imprisoned man's life at risk, judge rules

https://gothamist.com/news/deliberate-indifference-ny-state-put-imprisoned-mans-life-at-risk-judg...
1•GurnBlandston•9m ago•0 comments

The Old Man and the Strait

https://www.mcsweeneys.net/articles/the-old-man-and-the-strait
2•MaysonL•9m ago•0 comments

I Went to the Amazon to Fly in a 1942 Workhorse of Aviation

https://www.nytimes.com/2026/07/31/world/americas/plane-douglas-dc3-wwii-colombia.html
1•limitedfrom•9m ago•0 comments

Show HN: I rebuilt my 2008 football/lineup site

1•tole42•9m ago•0 comments

How the Airbus A350’s Massive Landing Gear Is Built

https://www.youtube.com/watch?v=P4i-0lTryEs
1•skibz•10m ago•0 comments

The Least Private Operating System Ever Created [video]

https://www.youtube.com/watch?v=M_720LesVg4
2•dp-hackernews•10m ago•0 comments

I Filmed Plants for 12 Years

https://www.youtube.com/watch?v=tMUPNCR35h0
1•nyc111•10m ago•0 comments

Microchip released XC compilers for free

https://www.microchip.com/en-us/tools-resources/develop/mplab-xc-compilers
1•danielt3•10m ago•1 comments

Implementing PaxosLease in Python with HTTP Flask

https://bytepawn.com/paxoslease-python.html
1•abelanger•13m ago•0 comments

Tailscale didn't stop the Hugging Face intrusion

https://tailscale.com/blog/hugging-face-intrusion
13•bluehatbrit•14m ago•5 comments

AI companies destroy rare and non recoverable physical books

https://www.heraldscotland.com/opinion/26422014.library-alexandria-burns-ai-companies-destroying-...
4•DoddgyEggplant•16m ago•0 comments

Maths shows why your vote may not count the way you think it does

https://www.cam.ac.uk/research/news/maths-shows-why-your-vote-may-not-count-the-way-you-think-it-...
2•amichail•16m ago•0 comments

I pretrained the best small model under 100M parameters

https://twitter.com/HarshalsinghCN/status/2083223503554449745
1•cybernovas•18m ago•1 comments

Temu is a comically bad app

https://daringfireball.net/2026/07/temu_is_a_comically_bad_app
1•bpavuk•19m ago•1 comments

The icons that might solve Hollywood's AI problem [video]

https://www.youtube.com/shorts/SsK4ILb3j5I
1•perching_aix•19m ago•0 comments

Temu App Launch Sequence

https://social.panic.com/@cabel/116987028774035194
1•yurivish•20m ago•0 comments

Nuclear Waste Cleanup: DOE Is Missing Opportunities to Apply Lessons

https://www.gao.gov/products/gao-26-108082
2•Jimmc414•24m ago•0 comments

Flock CEO Admits Flock Alerts on People

https://ipvm.com/reports/flock-ceo-alerts-people
4•jhonovich•24m ago•0 comments

Google pauses AI satellite images, after fears of deepfakes in the sky

https://www.npr.org/2026/07/31/nx-s1-5914652/google-adds-ai-to-satellite-images-raising-fears-of-...
1•Jimmc414•24m ago•0 comments

You're probably overpaying on Amazon and you don't know it

https://chromewebstore.google.com/detail/lowly-compare-similar-pro/koaboghopffkngciajncjhcjcjnakijf
1•Lirrydoz•24m ago•0 comments

Did Situational Awareness inflate the AI bubble?

https://www.yetanothervalueblog.com/p/did-situational-awareness-inflate
2•mapping365•24m ago•0 comments

How big data created the modern dairy cow

https://worksinprogress.co/issue/how-big-data-created-the-modern-dairy-cow/
2•geneticdrifts•24m ago•0 comments

Go-ktls – Linux Kernel TLS offload for Go's net/HTTP

https://github.com/waipu-oss/go-ktls
2•totallyunknown•30m ago•0 comments

The biggest gamble in the U.S. economy is starting to look riskier

https://www.washingtonpost.com/technology/2026/07/31/tech-giants-burning-cash-ai-create-risks-who...
4•_tk_•31m ago•1 comments