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/

Command and Conquer (1995) on an Atari ST

https://indyjo.itch.io/commandconquer
1•indyjo•11s ago•0 comments

Watchdog to Congress: Don't Be Fooled by the Kids Act

https://www.protectingtaxpayers.org/press/watchdog-to-congress-dont-be-fooled-by-the-kids-act/
1•bilsbie•30s ago•0 comments

Reid Hoffman says SpaceX 'not an AI company', xAI 'complete train wreck'

https://fortune.com/2026/06/24/reid-hoffman-spacex-musk-openai-anthropic-gen-z-mistake/
1•1vuio0pswjnm7•3m ago•1 comments

I built a flat-rate DeepSeek API for Claude Code (with vision support)

https://cloudcode.one/
2•tatuhelander•4m ago•0 comments

Adopting AV1 for Real-Time Communication (RTC) at Scale

https://engineering.fb.com/2026/06/22/video-engineering/adopting-av1-for-real-time-communication-...
1•ledoge•5m ago•0 comments

Kebab Benchmark for LLMs

https://twitter.com/victormustar/status/2069688722409312332
1•jonbraun•7m ago•0 comments

Ask HN: DIstribution Problem and Solutions

1•Neobecomer•7m ago•0 comments

Show HN: Stupify – anti-slop code review for AI agents

https://github.com/Octember/stupify
2•octember•7m ago•1 comments

What's the worst thing your AI agent did in production without asking first?

1•rockingraj•7m ago•0 comments

What's the worst thing your AI agent did in production without asking first?

1•rockingraj•8m ago•0 comments

Covid vaccines cut risk of hospital care, heart complications, new data reveal

https://www.cidrap.umn.edu/covid-19/updated-covid-vaccines-cut-risk-hospital-care-heart-complicat...
3•throw0101d•8m ago•0 comments

Robert Heinlein and Arthur C. Clarke interview with Walter Cronkite – Apollo 11 [video]

https://www.youtube.com/watch?v=4PLTkYJ7C40
1•simonebrunozzi•10m ago•0 comments

Prevail – a model-agnostic AI harness for everyday life

https://prevail.sh/
1•mrlou•11m ago•0 comments

Memory Reconsolidation

https://nonlinearfunction.org/notes/memory-reconsolidation/
1•dmonay•12m ago•0 comments

Chip's Challenge

https://en.wikipedia.org/wiki/Chip%27s_Challenge
2•tosh•12m ago•0 comments

Let's Decode the Mystery Bytes [video]

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

Agility, Maker of Humanlike Robots, to Go Public in $2.5B SPAC Deal

https://www.wsj.com/finance/agility-maker-of-humanlike-robots-to-go-public-in-2-5-billion-spac-de...
1•flurie•12m ago•0 comments

How to break your AI agent

https://thoughts.jock.pl/p/how-to-break-your-ai-agent-basics-2026
1•joozio•13m ago•0 comments

Show HN: Built a Git ext. in Rust that tracks which AI wrote each line of code

https://autter.dev/autter-cli
2•sagnikghosh•14m ago•0 comments

Fueler.io just crossed 95000 registered users

https://fueler.io
1•ritendn•14m ago•1 comments

Show HN: Make your game multiplayer in one prompt

https://antics.gg/
2•heyitssim•14m ago•0 comments

Everyone Is Wrong About AI Except Me

https://jasonpargin.substack.com/p/everyone-is-wrong-about-ai-except
1•teddyh•15m ago•1 comments

Managed to get a criminal investigation into adtech

https://www.thatprivacyguy.com/blog/criminal-investigation-adtech-surveillance/
4•AlexanderHanff•15m ago•2 comments

Ask HN: How is the personal assistant you're building different?

1•velyan•17m ago•0 comments

A friendly, non-technical introduction to differential privacy

https://desfontain.es/blog/friendly-intro-to-differential-privacy.html
1•simonebrunozzi•17m ago•0 comments

Show HN: Trial library based with OTP detected tempmail service

https://huskmail.xyz
1•draggodra•18m ago•0 comments

Today's Office: A Visual Log

https://www.ssp.sh/brain/todays-office/
1•zazuke•19m ago•0 comments

Selling Smart Link – Affiliate Tracking SaaS ($2k)

https://www.by-smartlink.com/
1•smartlink30•20m ago•0 comments

Europeans should learn to love the air-conditioner

https://www.economist.com/europe/2026/06/18/europeans-should-learn-to-love-the-air-conditioner
9•Kaibeezy•20m ago•6 comments

No Side to Take: Political Indifference Inside the 4vps.su Leak

https://disclosing.observer/2026/06/23/political-indifference-4vps-leak.html
3•0x5h4un1•21m ago•0 comments