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: I used Claude to make some free fun pet-themed browser arcade games

https://whatpetshouldiget.com/play.html
1•scamdrill•3m ago•0 comments

Evaluating the impact of two decades of USAID intervention

https://www.thelancet.com/action/showPdf?pii=S0140-6736%2825%2901186-9
2•Topfi•4m ago•0 comments

How the Bayeux Tapestry broke the internet

https://spectator.com/article/how-the-bayeux-tapestry-broke-the-internet/
1•thinkingemote•4m ago•0 comments

Laguna XS 2.1 33B on a RTX 3090: 296 tok/s peak, 152 tok/s at 256K context

https://www.lucebox.com/blog/laguna-xs21
1•GreenGames•4m ago•0 comments

Show HN: Check your RAG agent's literal groundedness with verbatimeter

https://pypi.org/project/verbatimeter/
1•pobonin•8m ago•0 comments

List of OpenAI Whisper Checkpoints Variants

https://blog.sparsh.dev/list-openai-whisper-checkpoints-variants/
1•sparshrestha•12m ago•1 comments

Lobster Is Migrating to SQLite

https://github.com/lobsters/lobsters/pull/1927
1•maxloh•13m ago•0 comments

San Francisco Inches Closer to PG&E Acquisition

https://www.kqed.org/news/12090521/san-francisco-inches-closer-to-pge-acquisition
1•rdoherty•14m ago•0 comments

Show HN: SignalPosts – turns sales call transcripts into LinkedIn posts

https://www.signalposts.com
1•mistaflu•15m ago•0 comments

'Ghostcommit' hides prompt injection in images to fool AI agents, steal secrets

https://www.bleepingcomputer.com/news/security/ghostcommit-hides-prompt-injection-in-images-to-fo...
1•Brajeshwar•15m ago•0 comments

Show HN: Agent World – an open standard and live market for personal AI agents

https://github.com/macrokit/agent-world
1•spriterock•15m ago•0 comments

Disappearing Polymorph

https://en.wikipedia.org/wiki/Disappearing_polymorph
1•hliyan•15m ago•0 comments

Spacetime as a discrete computational NavMesh: Deriving a 0.8723as universal r.r

https://zenodo.org/records/21273378
1•TomerHaimovich•16m ago•0 comments

Google deleting all recently inactive accounts without phone number

4•superkuh•17m ago•2 comments

Can we reconstruct a tokenizer using only two oracles from the chat API?

https://old.reddit.com/r/LocalLLaMA/comments/1utc5b9/can_we_reconstruct_a_closedsource_llm_tokeni...
1•bayes-song•17m ago•1 comments

Show HN: TargetBridge – Use an Intel iMac as a Thunderbolt Display Apple Macs

https://github.com/swellweb/targetBridge
1•targetbridge•18m ago•0 comments

Fixed-Point Combinator

https://en.wikipedia.org/wiki/Fixed-point_combinator
3•tosh•24m ago•0 comments

Deep dive into iroh, a peer-to-peer communication layer for your application

https://kerkour.com/iroh-v1-p2p
8•cold_pizz4•24m ago•1 comments

Is Life Just Different?

https://www.quantamagazine.org/is-life-just-different-20260708/
1•snorbleck•24m ago•0 comments

Religion: Meanings of Marx' "Opium of the People" [video]

https://www.youtube.com/watch?v=C14q4DOVFno
2•penguin_booze•26m ago•0 comments

Cuelume – Tiny interaction sounds that make interfaces feel alive

https://cuelume-site.pages.dev/
2•lumannnn•30m ago•0 comments

Fdisk and the Importance of Sleep

https://parlaiment.bearblog.dev/fdisk-and-the-importance-of-sleep/
1•vonargo•30m ago•0 comments

LingBot-World 2.0: Open-source world model with hour-long interactive generation

https://github.com/Robbyant/lingbot-world-v2
1•Kajaking•31m ago•0 comments

Rebuilding My Homelab with Compose, Ruby, IPv6, and No Kubernetes

https://www.petekeen.net/homelab-resolved/
2•zrail•34m ago•1 comments

Apple sues OpenAI over mass IP theft

https://appleinsider.com/articles/26/07/10/apple-sues-openai-previous-vp-of-product-design-over-m...
3•kristianpaul•36m ago•1 comments

Show HN: I turned my quote collection into a walkable 3D library (desktop-only)

https://jakubhalmes.com/library/
2•jac08h•37m ago•2 comments

The Mind-Bending Company That Gets a Million Job Applications–and Rejects 99.9%

https://www.wsj.com/business/bending-spoons-jobs-hiring-stock-eaed2b8e
2•fortran77•39m ago•1 comments

Barbarians at the Gateways (2013)

https://queue.acm.org/detail.cfm?id=2536492
1•tosh•40m ago•0 comments

Show HN: Learn by rebuilding Redis, Git, a database from scratch

https://shipthatcode.com
2•acley•41m ago•0 comments

Speculations Concerning the First Ultraintelligent Machine (1965) [pdf]

https://languagelog.ldc.upenn.edu/myl/Good1964.pdf
9•zetalyrae•48m ago•0 comments