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/

Rocket launch costs have dropped 96% since 1960. How low can they go?

https://www.space.com/space-exploration/launches-spacecraft/rocket-launch-costs-have-dropped-96-p...
1•speckx•1m ago•0 comments

Corners Don't Look Like That: Regarding Screenspace Ambient Occlusion

https://nothings.org/gamedev/ssao/
1•firephox•1m ago•0 comments

Apps Marketed to US Troops Are Shipping Chinese and Russian Code

https://www.wired.com/story/apps-marketed-to-us-troops-are-shipping-chinese-and-russian-code/
1•sbulaev•1m ago•0 comments

Netflix Paid $587M for Ben Affleck's AI Startup InterPositive

https://variety.com/2026/film/news/netflix-paid-587-million-ben-affleck-ai-interpositive-1236815111/
1•caseysoftware•3m ago•0 comments

It Might Be Time to Grow Your Own Lettuce

https://nymag.com/strategist/article/cyclosporiasis-grow-your-own-lettuce.html
1•speckx•3m ago•0 comments

Road traffic noise and risk of Parkinson disease

https://jamanetwork.com/journals/jamaneurology/fullarticle/2851756
2•geox•5m ago•0 comments

NYC Apartment Aquaponics

https://erinmurphy.dev/projects/project-2/
1•mm1119•8m ago•0 comments

The Scariest Chart in Electrical Engineering [video]

https://www.youtube.com/watch?v=GK2pZ_oVU1o
1•surprisetalk•8m ago•0 comments

I Tracked 997 Chrome Extensions That Changed Their Titles

https://extensionranker.com/blog/chrome-extension-title-changes-rankings
1•Joseph_Hu•8m ago•0 comments

NYC Subway Signals: A Complete Guide

https://www.nycsubway.org/wiki/Subway_Signals%3A_A_Complete_Guide
3•at1as•8m ago•0 comments

Caffeine and Cardiovascular Disease: Aha Scientific Statement

https://www.ahajournals.org/doi/epub/10.1161/CIR.0000000000001454
1•brandonb•8m ago•0 comments

Capping the price of healthcare is a mistake

https://www.nytimes.com/2026/07/20/opinion/health-care-prices-insurance-caps.html
2•brandonb•9m ago•0 comments

Can an Apple lawsuit derail OpenAI's hardware plans?

https://techcrunch.com/2026/07/19/can-an-apple-lawsuit-derail-openais-hardware-plans/
1•ent101•9m ago•0 comments

What I got wrong about FIRE

https://www.businessinsider.com/fire-movement-followers-modern-work-hustle-culture-solution-2026-7
1•littlexsparkee•9m ago•1 comments

Show HN: Codex Harness for Java Unit Testing

https://github.com/JAIPilot/jaipilot-cli
1•surajkrajan•9m ago•0 comments

Show HN: Send your agent to solve open math missions

https://mission.land/
1•timqian•10m ago•0 comments

SWE Budgets: From Opex to Capex

https://www.jay.ai/blog/swe-budgets-from-opex-to-capex
1•_jayhack_•11m ago•0 comments

Adversarial Clothing

https://www.theguardian.com/fashion/2026/jul/17/adversarial-clothing-are-garments-designed-to-con...
1•bookofjoe•12m ago•0 comments

Secure Quantum Computing / CE 395 / Spring 2026 / Northwestern University

https://www.youtube.com/playlist?list=PLWOUVwVosA-7aCa6SBXoM_m66WV-K_N0o
1•refezs•12m ago•0 comments

Metago: Write templates that write go

https://metago.dev/
1•crowdyriver•13m ago•1 comments

The ACLU Is Arming Lawyers to Expose State Surveillance Secrets

https://www.wired.com/story/the-aclu-is-arming-lawyers-to-expose-state-surveillance-secrets/
3•Brajeshwar•13m ago•0 comments

Ask HN: Why am I getting the error that I can't submit to ShowHN?

1•anoop_kumar•14m ago•1 comments

What Is a Semantic Layer?

https://blog.strata.do/p/what-is-the-semantic-layer
1•ajoski9•14m ago•0 comments

Google Is Building an A.I. Fence Around the Internet It Once Championed

https://www.nytimes.com/2026/07/20/technology/google-ai-open-web.html
1•jsphweid•14m ago•0 comments

JSON5E: JSON5 for Humans

https://github.com/boris-kolpackov/libpdjson5/blob/master/JSON5E.md
1•maxloh•15m ago•0 comments

Haystack 3.0: Agents with hooks, skills, and built-in introspection

https://haystack.deepset.ai/release-notes/3.0.0
6•kacperlukawski•15m ago•1 comments

Deploy Umami Analytics in minutes instead of hours

https://umamiengine.com/
1•princesauro•15m ago•0 comments

Show HN: A browser-based canvas for custom physical notepads

https://www.theframepad.com/
2•awahed•16m ago•0 comments

France bought back it's nuclear steam turbine champion [video]

https://www.youtube.com/watch?v=MFgYnxHumsY
1•caminanteblanco•17m ago•0 comments

Show HN: Fair500 – Ranking the S&P500 on pay ratios and worker equity

https://fair500.com/
1•BlakeBalbirnie•17m ago•1 comments