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/

Most performant, secure, scalable, reliable, freest, open source data platform

https://averagedatabase.com
1•vismit2000•2m ago•0 comments

Laravel Anti DDoS!

https://github.com/farad-tech/laravel-auto-shield
1•faradtech•3m ago•0 comments

Show HN: How to Use Unlimited Token Plan with OpenCode

https://twitter.com/CanopyWave_AI/status/2069957571184832525
2•Timmyzzz•7m ago•0 comments

Anthropic Claims Alibaba Ran 'Brazen' Campaign to Access Its Claude AI Model

https://www.wsj.com/tech/ai/anthropic-claims-alibaba-ran-brazen-campaign-to-access-its-claude-ai-...
1•flowerlad•9m ago•0 comments

ORA: Smaller Models. Same Intelligence

https://www.oracomputing.com/
1•doener•11m ago•0 comments

The Era of Tokenmaxxing Is Over

https://techcrunch.com/2026/06/24/companies-are-scrambling-to-stop-employees-from-maxing-out-ai-b...
1•sambcui•11m ago•0 comments

Show HN: Tree, truth, druid and tar share one Proto-Indo-European root

https://p.migdal.pl/tree-of-tree/
1•stared•11m ago•0 comments

Vibecoding a High Performance System

https://andrewkchan.dev/posts/systems.html
2•davedx•18m ago•0 comments

NextBSD – FreeBSD ABI-compatible kernel with Mach built in and launchd

https://nextbsd.org/
2•sunshine-o•21m ago•0 comments

Hollywood and Big Tech Are Preparing for War

https://www.hollywoodreporter.com/business/business-news/hollywood-big-tech-war-entertainment-pla...
1•thm•22m ago•0 comments

Show HN: Cc-preview – Browse images pasted into Claude Code sessions

https://github.com/Watari995/cc-preview
1•Watari995•22m ago•0 comments

Flatpak package for GIMP 0.54.1 (1996)

https://gitlab.gnome.org/balooii/gimp-0.54
1•birdculture•26m ago•0 comments

13 years and $500M for a stage adapter? Report justifies NASA cancellations

https://arstechnica.com/space/2026/06/analysis-finds-the-exploration-programs-nasa-recently-cance...
1•rbanffy•26m ago•0 comments

Show HN: JSON Bonsai – browser JSON viewer that stays smooth on 100k+ nodes

https://github.com/pedrosousa13/JSON-Bonsai
1•pedrosousa•27m ago•0 comments

How to Build 1-Minute OHLC Bars from Non-Uniform Market Snapshot Data

https://medium.com/@DolphinDB_Inc/how-to-build-1-minute-ohlc-bars-from-non-uniform-market-snapsho...
2•dbaa4real•28m ago•0 comments

Show HN: Best Alternative for Zendesk, Intercom, and Freshdesk

2•Daniel-Pan•29m ago•0 comments

Monolith Rift, a brutalist corridor of light and impossible scale

https://sand-morph.up.railway.app/monolith-rift
4•echohive42•31m ago•1 comments

UMLBot: Converting natural language and code excerpts to editable UML diagrams

https://www.sciencedirect.com/science/article/pii/S2352711026002815
1•geox•32m ago•0 comments

Rcarmo/kata: Repetition makes perfect

https://github.com/rcarmo/kata
1•rcarmo•39m ago•0 comments

Claude Opus 4.5 vs. GLM-5.2

https://gopeekapp.blogspot.com/2026/06/glm-52-vs-claude-opus-45.html
1•bhartipoddar•40m ago•0 comments

US fighter pilot avoids British trial after raping a woman in England

https://www.theguardian.com/uk-news/ng-interactive/2026/jun/25/us-fighter-pilot-strangled-woman-e...
4•Alien1Being•43m ago•1 comments

Qualcomm Investor Day 2026 Data Center Announcements CPUs

https://www.servethehome.com/qualcomm-investor-day-2026-data-center-announcements-cpus-ai-acceler...
1•ksec•46m ago•1 comments

A Y2K bug surfaced 26 years late today

https://old.reddit.com/r/sysadmin/comments/1uetdyw/a_y2k_bug_surfaced_26_years_late_today/
1•thunderbong•46m ago•0 comments

Calculate Real-Time Implied Volatility for Commodity Options

https://medium.com/@DolphinDB_Inc/how-we-built-a-real-time-implied-volatility-engine-for-commodit...
2•Polly_Liu•48m ago•0 comments

Warrior Cats Name Generator

https://warriorcatsnamegenerator.net/
1•woflying•49m ago•0 comments

We Made Trading Signals Microsecond-Level Easy – 100 Factors in 40µs

https://medium.com/@DolphinDB_Inc/we-just-made-trading-signals-microsecond-level-easy-100-factors...
2•CrazyTomato•49m ago•0 comments

You are leaving tech, what's next?

https://www.seattletimes.com/business/local-business/older-tech-workers-are-tapping-out-early-her...
1•ynac•49m ago•1 comments

Long distance Uber alternative (for passengers and drivers)

https://localsride.com/en
1•dr_dimitru•49m ago•0 comments

Will AI replace technical writers?

https://willaireplacetechnicalwriters.com/
1•theletterf•50m ago•1 comments

Got access to Gemini's actual thinking

1•StizzurpXDD•50m ago•0 comments