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/

Space Invaders – Amiga 500

https://github.com/kotbehemot53/amiga-space-invaders
1•doener•58s ago•0 comments

Why does gravity make different structural shapes depending on the cosmic scale?

https://physics.stackexchange.com/questions/873986/why-does-gravity-produce-different-structural-...
1•azeemba•1m ago•0 comments

Meta's Teen Safety Case Just Became a $1.4T Existential Threat

https://gizmodo.com/metas-teen-safety-case-just-became-a-1-4-trillion-existential-threat-2000782306
1•kordlessagain•1m ago•0 comments

Website Can Return HTTP 200 but Still Be Broken

https://medium.com/@thesuperrepemail/8-ways-your-website-can-return-http-200-but-still-be-broken-...
1•mssblogs•2m ago•0 comments

Jelly Burn ReviEwS (2026): We Tried It My Honest Review

https://wanderlog.com/view/hjfxepslpw/jelly-burn-reviews-2026-we-tried-it-my-honest-review
1•doramartq•2m ago•0 comments

I Taught Myself C by Rejecting Modern Tech [video]

https://www.youtube.com/watch?v=I7CeqmFiWYY
1•peterkelly•2m ago•0 comments

Why false sharing alignment should be 128 bytes on x64

https://monoid.github.io/posts/false-sharing-alignment/
1•birdculture•2m ago•0 comments

America Is Building a Wealth System

https://www.wealthsystems.ai/p/america-is-building-a-wealth-system
1•mattmcdonagh•4m ago•0 comments

Show HN: GUI-tool – zero-dependency Rust CLI for desktop GUI automation

https://github.com/ZachRouan/agent-desktop-interface
1•ZachRouan•4m ago•0 comments

Just Keep at It: A Decade at Mozilla

https://eqrion.net/ten-years-at-mozilla/
1•eqrion•5m ago•0 comments

Psychological stress catalyses free activation of coagulation in humans

https://physoc.onlinelibrary.wiley.com/doi/10.1113/JP290576
2•austinallegro•6m ago•1 comments

Flux Turns 10

https://fluxcd.io/blog/2026/07/flux-turns-10/
1•backlit4034•6m ago•0 comments

Gordon Wood's Proust

https://thelampmagazine.com/blog/gordon-woods-proust
1•keiferski•8m ago•0 comments

Show HN: A UML drawing skill for your coding agent docs

https://github.com/BESSER-PEARL/uml-drawing-skill
3•softmodeling•8m ago•0 comments

Lucas' Laws of Project Management

https://www.lucasfcosta.com/blog/laws-of-software-project-management
2•lucasfcosta•8m ago•0 comments

DuckDuckGo browser now blocks YouTube video ads

https://www.bleepingcomputer.com/news/software/duckduckgo-browser-now-blocks-youtube-video-ads/
3•ilreb•8m ago•0 comments

Waymo car delivers misbehaving teen passengers to San Mateo police

https://www.mercurynews.com/2026/07/07/waymo-car-reports-drinking-teens/
2•mooreds•9m ago•0 comments

Describing All My Photos

https://alexwlchan.net/2026/describing-my-photos/
1•surprisetalk•9m ago•0 comments

Proposal would allow drivers to trade personal data for lower insurance rates

https://calmatters.org/economy/2026/07/telematics-car-insurance-bill/
1•cdrnsf•11m ago•0 comments

Scaling Loop Engineering to the Team

https://twitter.com/etticat/status/2074731559941259659
2•etticat•11m ago•0 comments

France orders Meta to resume talks with media groups over publishing fees

https://www.reuters.com/world/french-antitrust-watchdog-orders-meta-resume-talks-with-media-group...
3•1vuio0pswjnm7•12m ago•0 comments

Manage Your Claude Code Config with Dotfiles and GNU Stow

https://www.yurikoval.com/blog/manage-ai-config-with-dotfiles.html
1•yurikoval•13m ago•0 comments

GLM-5.2 (max) matches Claude Opus 4.8 on Harvey LAB-AA benchmark

https://artificialanalysis.ai/evaluations/harvey-lab-aa
2•bogdiyan•13m ago•0 comments

EU top court dismisses Google fight against record €4.1B EU antitrust fine

https://www.irishtimes.com/technology/2026/07/02/eu-top-court-dismisses-google-fight-against-reco...
4•1vuio0pswjnm7•14m ago•0 comments

Cinchor – Control what an AI agent can do, and prove what it did

https://cinchor.com
1•foh_quarters•15m ago•0 comments

Show HN: Whentofly – flexible-date flight search that says if the price is good

https://whentofly.io
3•dimabalony•16m ago•1 comments

Is AI making us dumber?

https://www.businessinsider.com/ai-making-us-dumber-research-2026-7
2•amichail•17m ago•0 comments

The Social Tier: Remembering Who Said What

https://pentad.ai/PLRN/017/
1•kendallgclark•20m ago•2 comments

Sipeed NanoXray

https://sipeed.com/nanoxray
1•serhack_•22m ago•1 comments

Backdoor security alert over Anthropic's Claude Code

https://www.reuters.com/legal/litigation/china-issues-backdoor-security-alert-over-anthropics-cla...
4•Alien1Being•23m ago•0 comments