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/

Show HN: Elah – A browser-native, frame-accurate video editor

https://github.com/elahlabs/elah
1•paulSpaurgen•47s ago•0 comments

I Replaced a $144/Year App in <2 Hours. The Moat Was Never There

https://substack.com/@vmysla/p-197723867
1•vmysla•5m ago•0 comments

The contract that could get you FIRED (lexploit)

https://www.legalquants.com/blog/the-contract-that-could-get-you-fired
1•SaifAlYounan•5m ago•0 comments

Trump is becoming Jimmy Carter

https://www.ft.com/content/c6e506e0-4b95-437b-8fad-ac436a71c3de
1•GreenSalem•8m ago•1 comments

My side of the jqwik anti AI logging drama

https://blog.johanneslink.net/2026/06/09/the-jqwik-anti-ai-affair/
2•phoronixrly•12m ago•1 comments

Claude Fable 5: the first public Mythos-class model

https://artificialanalysis.ai/articles/claude-fable-5-mythos
2•Topfi•13m ago•0 comments

If Claude Fable stops helping you, you'll never know

https://jonready.com/blog/posts/claude-fable5-is-allowed-to-sabotage-your-app-if-youre-a-competit...
3•mips_avatar•14m ago•1 comments

Claude Fable 5 will sabotage "frontier LLM research" tasks

https://twitter.com/i/status/2064399902684139852
3•qwertyforce•16m ago•1 comments

Flathub disallows LLM-based submissions

https://social.treehouse.systems/@barthalion/116657011366876079
3•birdculture•20m ago•0 comments

I built a BNB Chain liquidity sniper bot and it proved a losing game

https://e-mahmoudi.me/blog/i-built-a-liquidity-sniper-bot-for-bnb-chain-and-it-proved-a-losing-game/
3•jeyem•21m ago•0 comments

I Stress-Tested Claude Mythos [video]

https://www.youtube.com/watch?v=t5xKkn8JXMM
1•bmahir22•21m ago•0 comments

Ask HN: Are you using a serverless SQL database?

1•dzonga•21m ago•0 comments

When production is infinite, judgment becomes the bottleneck

https://tasteisnotagift.com/
2•dilipkj•25m ago•0 comments

Just Be Normal About Things

https://www.joanwestenberg.com/p/just-be-normal-about-st
2•spking•25m ago•0 comments

Exif Smuggling

https://github.com/signalblur/exifsmugglingpoc
5•rolph•27m ago•1 comments

The Most Surprising Economic Success Story Is North Korea

https://www.wsj.com/world/asia/north-korea-economy-success-e80f7062
2•karakoram•27m ago•2 comments

What studying animals teaches us about toxic work environments

https://theconversation.com/predators-and-prey-what-studying-animals-teaches-us-about-toxic-work-...
2•PaulHoule•27m ago•0 comments

Show HN: LocalCode – turn plain English into CLI commands with Apple's local AI

https://github.com/localcodeai/localcode
1•rahlokzero•28m ago•0 comments

Dino-killing asteroid may have sparked millions of years of hydrothermal life

https://www.scientificamerican.com/article/the-asteroid-that-killed-the-dinosaurs-may-have-sparke...
4•rbanffy•30m ago•0 comments

Rare meteorite might be a relic from a 'lost world' – Scientific American

https://www.scientificamerican.com/article/rare-meteorite-might-be-a-relic-from-a-lost-world/
3•rbanffy•31m ago•0 comments

Company Will Add Phone, AirPod, and Smartwatch Trackers to ALPRs

https://www.404media.co/this-company-will-add-phone-airpod-and-smartwatch-trackers-to-license-pla...
10•Cider9986•31m ago•0 comments

Upcoming breaking changes for NPM v12

https://github.blog/changelog/2026-06-09-upcoming-breaking-changes-for-npm-v12/
7•plasma•32m ago•0 comments

Worst People Imaginable Freak Out over Racist Plantation Game

https://kotaku.com/racist-plantation-game-trolls-valve-watches-2000698673
2•cdrnsf•32m ago•0 comments

Tectonic: A modernized, complete, self-contained TeX/LaTeX engine

https://tectonic-typesetting.github.io/en-US/
3•maxloh•32m ago•0 comments

Ask HN: Ever used non-AVP glasses as a virtual display? Which ones?

1•cadamsdotcom•32m ago•0 comments

Protein Biology World Model to Address Disease

https://www.genengnews.com/topics/artificial-intelligence/biohub-releases-protein-biology-world-m...
1•gmays•33m ago•0 comments

In A.I. Blunder, More Than 34,000 Instagram Accounts Became Vulnerable

https://www.nytimes.com/2026/06/09/technology/instagram-hack-ai-bug.html
2•vinni2•34m ago•0 comments

Nightmare Eclipse: RoguePlanet Windows Defender race condition to SYSTEM shell

https://deadeclipse666.blogspot.com/2026/06/its-patch-tuesday.html
2•guessmyname•35m ago•0 comments

632nm: Dr Michael Levin on Bioelectricity and Morphogenesis

https://www.youtube.com/watch?v=t6EFV2gSSmg
2•wwarner•36m ago•0 comments

AI is only as good as the person using it

https://aifrog.substack.com/p/as-good-as
1•lessmilk•38m ago•0 comments