frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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/

Successful Launch Spurs China Toward Crucial First for Moon Landing

https://www.sciencealert.com/successful-launch-spurs-china-toward-crucial-first-for-moon-landing
1•ColinWright•2m ago•0 comments

Exploring the Therapeutic Benefits of Pranayama: A Systematic Review

https://pmc.ncbi.nlm.nih.gov/articles/PMC7336946/
1•rramadass•6m ago•0 comments

Easy (Horizontal Scrollbar) Fixes for Your Blog CSS

https://aartaka.me/easy-fixes.html
1•severine•9m ago•0 comments

The Unix Timesharing System 1974: Denis M. Ritchie and Ken Thompson

https://dl.acm.org/doi/epdf/10.1145/361011.361061
1•KnuthIsGod•9m ago•0 comments

The placenta goes viral: Retroviruses control gene expression in pregnancy [pdf]

https://pmc.ncbi.nlm.nih.gov/articles/PMC6177113/
1•thunderbong•12m ago•0 comments

What is so special about Emacs? [video]

https://www.youtube.com/watch?v=mJZDmO5yOxE
1•signa11•12m ago•0 comments

AI guardrails stripped from Meta and Google models in minutes

https://www.ft.com/content/5630ed79-a263-41ed-9a1a-321617ae310e
2•uxhacker•15m ago•2 comments

Pope Leo Warns of Risks from A.I. In 42,300-Word Encyclical

https://www.nytimes.com/2026/05/25/world/europe/pope-leo-encyclical.html
1•adrianhon•17m ago•1 comments

Mark Zuckerberg's Right-Hand Man Who's Unleashing AI at Meta

https://www.wsj.com/tech/ai/meta-andrew-bosworth-ai-3df12d4f
1•swolpers•19m ago•0 comments

The Conquest of Hip-Hop – pt. I

https://medium.com/the-hitmagist/the-conquest-of-hip-hop-pt-i-70534b69f4f4
1•bryanrasmussen•19m ago•0 comments

AgentSlice – Make AI coding agents ask before they edit

https://github.com/espenandreass1/agentslice
1•espenand•26m ago•0 comments

IBM Spins Off the First Pure-Play Quantum Chip Foundry

https://futurumgroup.com/insights/2-billion-chips-act-investment-in-quantum-bets-on-ibms-300mm-su...
2•rbanffy•26m ago•0 comments

MCP, MC Me [video]

https://www.youtube.com/undefined
1•AddisonHoff•28m ago•0 comments

Rising seas will swallow New Orleans. People need to start relocating now

https://www.cnn.com/2026/05/25/climate/new-orleans-sea-level-rise-relocation
1•breve•28m ago•1 comments

Zinc – zero-copy shared memory for polyglot stacks

https://mine-27913f41.mintlify.app
1•mohd-aman-k•29m ago•0 comments

Startup Viability Scoring Engine

https://www.tooldocket.com/2026/05/startup-viability-scoring-engine.html
1•stoicstoic•29m ago•0 comments

Show HN: I Built a Debugging Challenge for the AI Coding Age

https://theincidentchallenge.com/
4•stealthy_•31m ago•2 comments

Gemma 4: A new, budget-focused model in Posit AI

https://posit.co/blog/gemma-4-new-budget-focused-model-posit-ai
1•ionychal•32m ago•0 comments

Composer-cve-gate – pre-install gate for Composer, built after Laravel-Lang

https://github.com/sharkyger/composer-cve-gate
1•sharkyger•35m ago•0 comments

Is This Prime

https://isthisprime.com/game/
2•paulmist•36m ago•0 comments

Ask HN: First-time EM, quite lost – what helped you?

1•TheKernelTrick•37m ago•1 comments

Shannon Got AI This Far. Kolmogorov Shows Where It Stops

https://medium.com/@vishalmisra/shannon-got-ai-this-far-kolmogorov-shows-where-it-stops-c81825f89ca0
1•t-3•37m ago•0 comments

My AI agent called my code shit and took an unannounced vacation mid-sprint

https://medium.com/@kukushkinav/my-ai-agent-called-my-code-shit-took-an-unannounced-vacation-mid-...
2•KukushkinAV•41m ago•0 comments

Monumental Proof Settles Geometric Langlands Conjecture

https://www.quantamagazine.org/monumental-proof-settles-geometric-langlands-conjecture-20240719/
2•tamnd•42m ago•0 comments

Too Much Work to Do? Have Your Digital Twin Handle It

https://www.wsj.com/tech/ai/ai-agents-work-executives-a38400e1
3•thm•50m ago•0 comments

The time when Shopify and EC2 disliked each other

https://chetan343.substack.com/p/ec2-and-shopify-dislike-each-other
1•TheChetan•55m ago•1 comments

Show HN: HTML Deployer – AI Code to Website Publisher

https://chromewebstore.google.com/detail/html-deployer-1-click-ai/gihmknkabkkghpiocgnoiejagngdegea
2•slimcrm•55m ago•0 comments

How one of the Bay Area's most boring towns became the center of streaming

https://sfstandard.com/2026/05/24/los-gatos-netflix-headquarters-roku-reed-hastings/
3•littlexsparkee•55m ago•2 comments

Your Old Devices Depend on Dying Sensors. The Silicon Labs Incident Proves It

https://www.cambridge.org/engage/coe/article-details/6a054b304770e67d92e8c7a2
2•openrockets•1h ago•0 comments

Putting Animals on the Map

https://imagico.de/blog/en/putting-animals-on-the-map/
1•altilunium•1h ago•0 comments