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/

Overshadow-JS, suncalc tells you sun angles, this tells you shadows

https://github.com/Botfather90/overshadow
1•Brandon99pt•1m ago•0 comments

Yes, Robot. Yes, Boss?

https://cutlefish.substack.com/p/tbm-428-yes-robot-yes-boss
1•mooreds•8m ago•0 comments

Apple 'Hide My Email' Vulnerability Reveals Peoples' Real Email Addresses

https://www.404media.co/apple-hide-my-email-vulnerability-reveals-peoples-real-email-addresses/
3•tjwds•9m ago•0 comments

The circuit that lets your brain think and see

https://www.engineering.columbia.edu/about/news/circuit-lets-your-brain-think-and-see
2•hhs•9m ago•0 comments

US Government says it got hacked – again

https://techcrunch.com/2026/07/02/us-government-says-it-got-hacked-again/
2•jack1689•14m ago•0 comments

The Gap Map v0.1

https://www.currentai.org/blogs/introducing-the-gap-map-v0-1#article
2•droidjj•14m ago•0 comments

Ants: Who looks after the injured in a colony?

https://www.uni-wuerzburg.de/en/news-and-events/news/detail/news/ameisen-kolonie-verletzte-pflegt/
3•hhs•19m ago•1 comments

How Amsterdam invented the fire department

https://worksinprogress.co/issue/how-amsterdam-invented-the-fire-department/
6•zdw•19m ago•0 comments

GitHub offering CD-ROMs of your code for a few days

https://www.pcgamer.com/hardware/your-code-is-physically-yours-forever-until-you-lose-it-lets-be-...
2•evo_9•20m ago•1 comments

Shopify SEO Experts Can Boost Your Online Store Rankings

https://www.techwrath.com/shopify-seo-experts-boost-online-store-rankings/
2•techwrath11•24m ago•1 comments

Giant trees have no trouble pumping water to top branches

https://news.exeter.ac.uk/faculty-of-environment-science-and-economy/giant-trees-have-no-trouble-...
3•hhs•25m ago•0 comments

Steam Controller Auto-Charge – pilot to magnetic charging puck using CV

https://github.com/FossPrime/Steam-Controller-Auto-Charge
2•zdw•26m ago•0 comments

Save Claude Code Tokens with Smart Routing

https://github.com/regolo-ai/brick-SR1
2•FrancescoMassa•26m ago•0 comments

Elevating Privileges from Firefox to Android Root

https://rootme.nebusec.ai/
7•kozika•26m ago•1 comments

Dispersion loss counteracts embedding condensation in small language models

https://chenliu-1996.github.io/projects/LM-Dispersion/
5•E-Reverance•30m ago•0 comments

David Potter, the man who put Psion in the palm of your hand, logs off at 82

https://www.theregister.com/personal-tech/2026/07/03/david-potter-the-man-who-put-psion-in-the-pa...
4•sohkamyung•31m ago•1 comments

GitFut – Your GitHub stats turned into a World-Cup-style player card

https://gitfut.com
2•redbell•31m ago•0 comments

Sneaker Company Allbirds Plans to Pivot to A.I

https://www.nytimes.com/2026/04/15/us/allbirds-shoes-ai-pivot.html
2•shepherdjerred•31m ago•1 comments

Leanstral 1.5: Proof Abundance for All

https://mistral.ai/news/leanstral-1-5/
4•programLyrique•32m ago•0 comments

Show HN: Scout.kids – Agents that find activies for families

https://scout.kids
2•davmar•33m ago•0 comments

Radiolarite – "Iron of the Paleolithic"

https://en.wikipedia.org/wiki/Radiolarite
3•jumploops•38m ago•0 comments

Overturning a $1B Copyright Award Against a Broadband Provider

https://cacm.acm.org/opinion/overturning-a-1-billion-copyright-award-against-a-broadband-provider/
1•zdw•38m ago•0 comments

Coding without AI: a revolutionary new way to work

https://isaaclyman.com/blog/posts/coding-without-ai/
13•aard•39m ago•2 comments

Trip LLM safety refusals so that LLM-based code scanning wont see the malware

https://indieweb.social/@laurenshof/116720287681995824
1•radiator•39m ago•0 comments

Disputing the Declaration of Independence

https://www.historytoday.com/archive/feature/disputing-declaration-independence
3•pepys•48m ago•0 comments

Cosmic Fireworks by Infant Stars

https://www.space.com/astronomy/galaxies/infant-stars-celebrate-their-independence-with-cosmic-fi...
2•cybermango•51m ago•0 comments

Archivegenocide.com 64k videos show evidence of Israeli genocide

https://archivegenocide.com/
3•Dig1t•52m ago•0 comments

Show HN: Reading Assistant Physical Books Meta RayBans

1•roshangill•58m ago•0 comments

AI Trade Is Losing One of Its Key Signals

https://www.bloomberg.com/news/articles/2026-07-03/the-ai-trade-is-losing-one-of-its-key-signals-...
3•cybermango•1h ago•0 comments

Why Vancouver is always a stand-in for San Francisco in movies and TV shows

https://www.sfgate.com/sf-culture/article/vancouver-stand-in-movie-tv-sf-16613821.php
2•amichail•1h ago•0 comments