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/

Move Slow and Fix Things

https://endler.dev/2024/move-slow-and-fix-things/
1•ahmedhossamdev•6m ago•0 comments

Europe might become poor in the course of the next 10-20 years

https://twitter.com/johnloeber/status/2113382520498925767
1•MrBuddyCasino•8m ago•0 comments

A Printer Printing onto Paper

https://twitter.com/macrofying/status/2112904628509528219
1•MrBuddyCasino•17m ago•0 comments

Mapping Economic Theory with AI [pdf]

https://andreaciccarone.github.io/claim_graphs_draft.pdf
1•theanonymousone•22m ago•0 comments

Let's Kill the Four-Chord Song

https://www.honest-broker.com/p/lets-kill-the-four-chord-song
1•paulpauper•23m ago•0 comments

Thoughts I had while reading your comment

https://dynomight.substack.com/p/comment
1•paulpauper•25m ago•0 comments

An artist's take on AI in math

https://3blue1brown.substack.com/p/an-artists-take-on-ai-in-math
1•vismit2000•27m ago•0 comments

Jhana 5: Romance with the Void

https://psychotechnology.substack.com/p/jhana-5-romance-with-the-void
1•paulpauper•30m ago•0 comments

Why even the smartest people on the planet can think dumb things

https://www.fastcompany.com/91611128/smartest-people-think-really-dumb-things
1•edwinfredy•31m ago•0 comments

How Civilization was made: complete history of Sid Meier's iconic strategy games

https://www.youtube.com/watch?v=SdfxTXCw15s
1•doppp•34m ago•0 comments

SK Hynix Pulls Plug on Memory-Chip Unit U.S. IPO on Market Jitters

https://www.wsj.com/tech/sk-hynix-shelves-plans-for-u-s-listing-of-memory-chip-unit-solidigm-e967...
1•snikolaev•35m ago•0 comments

PHP2SHELL Patch for Older Versions

https://github.com/wasdthedebugger/php2shell
2•wasdthedebugger•35m ago•0 comments

Trump's Gamble to End the Iran War

https://www.theatlantic.com/national-security/2026/10/trump-iran-war-strikes-after-midterms/689121/
2•hebelehubele•36m ago•1 comments

Agent Tools for Unreal Engine

https://app.simplystream.com/
4•astlouis44•40m ago•0 comments

Breakthrough vaccine for the deadliest skin cancer cut risk by almost half

https://www.washingtonpost.com/health/2026/10/22/breakthrough-vaccine-deadliest-skin-cancer-cut-r...
1•pseudolus•46m ago•1 comments

'Former inmates want to come back to visit': inside Florida's prison zoo

https://www.theguardian.com/artanddesign/2026/oct/22/florida-keys-prison-zoo-prisoners
1•1659447091•49m ago•0 comments

GoodNotes Alternatives for iPad in 2026

https://sites.google.com/view/goodnotes-alternatives/7-goodnotes-alternatives-for-ipad-in-2026
3•bishwasbh•49m ago•0 comments

Debunking "Faster Than Rust": Malicious Benchmarks in Tov

https://blog.fyralabs.com/debunking-faster-than-rust-malicious-benchmarks-in-tov/
2•addidotlol•49m ago•1 comments

Why ClickHouse and Agents Are a Great Combo

https://blog.exe.dev/meet-exe-finops-the-custom-tool-i-built-for-our-billing-data
1•clemo_ra•49m ago•0 comments

Old School Bookmark Manager for the Browser

https://headsupapp.netlify.app
2•santynaren•49m ago•0 comments

eMudhra certificates are compromised. Here's what you need to know

https://blog.cloudflare.com/emudhra-certificate-compromise/
1•tirumaraiselvan•50m ago•0 comments

Node2Shell: From Brotli Data to Remote Code Execution

https://nodejs.org/en/blog/vulnerability/october-2026-security-releases
3•andromaton•52m ago•0 comments

Running Mac Apps on Cutefish

https://cutefish.org/blog/running-mac-apps/
2•davikr•54m ago•0 comments

How to face the end of the world – according to Plato and the Stoics

https://www.theguardian.com/wellness/ng-interactive/2026/oct/22/ancient-philosophy-apocalypse
1•1659447091•1h ago•0 comments

PHP2Shell Needs One HTTP Request. OpenNHP Never Lets It Arrive

https://opennhp.org/blog/php2shell-attackers-cannot-exploit-what-they-cannot-reach/
1•windcbf•1h ago•0 comments

Topological Logic Scans of Popular OS Repos

https://ulshe.ai/products_archaeologist.html
1•joreag•1h ago•1 comments

The U.S. Government's 2026 Financial Results Are in It's Bad

https://www.youtube.com/watch?v=5oWCcRkkI9s
1•rubicon33•1h ago•0 comments

We're addicted to social media. How do we get sober?

https://www.scientificamerican.com/article/were-addicted-to-social-media-how-do-we-get-sober/
6•jestinjoy1•1h ago•5 comments

State of ARM Support for Puget Bench

https://www.pugetsystems.com/blog/2026/10/22/state-of-arm-support-for-puget-bench/
1•zdw•1h ago•0 comments

Gemini Is Weird

https://discuss.google.dev/t/trusted-automation-with-google-antigravity-scaling-secure-finance-in...
1•simontwigggffff•1h ago•1 comments