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/

AI Is Making Us Lose Our Individuality

https://emmettbuckthompson.com/blog/ai-is-making-us-lose-our-individuality
1•emmettbt•12s ago•0 comments

Multi-Agent Simulation Framework for Verifiable Synthetic Corporate Corpora

https://arxiv.org/abs/2603.14997
1•jflynt76•1m ago•0 comments

Grok – Introducing /Goal

https://x.ai/news/introducing-goal
1•peterspath•1m ago•0 comments

The Tick That Hunts Down Its Hosts – Including Us

https://www.newyorker.com/magazine/2026/07/06/the-tick-that-hunts-down-its-hosts-including-us
1•littlexsparkee•1m ago•0 comments

To all those who still believe in democracy, prepare to fight

https://english.elpais.com/culture/2026-06-30/antonio-scurati-on-his-monumental-saga-about-mussol...
1•dxs•2m ago•0 comments

Iran's new plan for the most important oil route: Make every ship pay to pass

https://www.msn.com/en-us/news/world/iran-has-a-new-plan-for-the-world-s-most-important-oil-route...
1•petethomas•2m ago•0 comments

Show HN: LangevinAI – Automated FP&A for Everyone

https://langevinai.io/
1•L_Outsider•2m ago•0 comments

Ask HN: Where did the terminology (AI) "System Card" come from?

1•dv35z•3m ago•0 comments

PlayStation to wipe 551 films from customers' accounts

https://www.notebookcheck.net/Playstation-to-wipe-551-films-from-customers-accounts.1330123.0.html
1•Rizz•7m ago•2 comments

The two types of context every agent needs

https://www.octavehq.com/post/type-2-context
1•connor11528•8m ago•0 comments

Why Are the Super Mario Kart CPU's So Fast? [video]

https://www.youtube.com/watch?v=aNvPrYhvU0k
1•LaserDiscMan•9m ago•0 comments

Garbage for humans

https://unstory.eu/zye/
2•bobsoap•10m ago•0 comments

Apple iPhone 18 Pro supplier list, parts and photos exposed in Tata data leak

https://www.reuters.com/business/media-telecom/apple-iphone-18-pro-supplier-list-parts-photos-exp...
1•DR_MING•11m ago•0 comments

The Prevention of Literature

https://www.orwellfoundation.com/the-orwell-foundation/orwell/essays-and-other-works/the-preventi...
1•jruohonen•12m ago•0 comments

Don't use localhost:3000, use your own custom domain

https://idiallo.com/blog/say-no-to-localhost3000-use-custom-domains
2•lelanthran•13m ago•1 comments

5 Reasons MOQ Streaming Is a Great Fit for Surveillance and Monitoring

https://www.red5.net/blog/moq-streaming-is-a-great-fit-for-surveillance-and-monitoring/
1•mondainx•15m ago•0 comments

Wine 11.12 Released with Wayland Fractional Scaling

https://www.phoronix.com/news/Wine-11.12-Released
1•Bender•16m ago•0 comments

Claude Sonnet 5 Review

https://www.coderabbit.ai/blog/claude-sonnet-5-review
1•bgubitosa•16m ago•0 comments

The CC Founders Fireside Chat

https://creativecommons.org/2026/06/30/inside-the-cc-founders-fireside-chat/
1•Tomte•16m ago•0 comments

Fears CIA's mind-control program is still experimenting on Americans

https://www.dailymail.com/sciencetech/article-15941787/cia-mkultra-mind-control-experiments.html
1•Bender•16m ago•0 comments

A Wordle-style daily trading challenge

https://kandlequiz.trade/
1•ssarcandy•16m ago•1 comments

Rare but dangerous tick-borne virus on the rise in the U.S.

https://ktla.com/news/nationworld/rare-tick-borne-virus-on-rise-in-us/
4•Bender•17m ago•0 comments

American Homeowners Are One Disaster Away from Losing Everything

https://insurancedimes.com/2026/06/14/millions-of-american-homeowners-are-one-disaster-away-from-...
1•crookedroad44•17m ago•0 comments

Show HN: I made a heatmap of 3400 VCs who are open to cold emails

https://apparent.social/heat-map
3•west_subject•17m ago•0 comments

The most thermally efficient mass-produced combustion engine

https://guessingheadlights.com/a-chinese-automaker-has-created-the-most-efficient-car-engine-ever/
2•alok-g•18m ago•0 comments

Tell HN: Installing Cursor on iOS irreversibly changes your privacy settings

21•zkldi•22m ago•5 comments

Show HN: BetterVideo - privacy-first video enhancement API

https://api.bettervideo.io/developers
1•PradeepjenaBV1•23m ago•0 comments

Ask HN: How do you share /skills across your dev team?

1•bewal416•23m ago•2 comments

Programming Had Its Magic

https://old.reddit.com/r/learnprogramming/comments/1ui0dul/programming_had_its_magic/
2•philonoist•25m ago•0 comments

Agentic AI and the End of Static Information

https://ajaishar.github.io/blog/2026/the-end-of-static-information/
1•throwawayamzn1•26m ago•0 comments