frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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/

Twelve Ways to Be Wrong About AI-Assisted Coding

https://third-bit.com/2026/05/20/twelve-ways-to-be-wrong/
1•jllyhill•43s ago•0 comments

YALL Are Acting Like Kids Dont Make Me Call the FBI

1•TheORIGINALBOB•1m ago•0 comments

Sam Altman's startup is hoping Jared Leto's band will make you scan your eyeball

https://sfstandard.com/2026/05/21/jared-leto-sam-altman-eye-scanner-concert-tour/
1•petethomas•2m ago•0 comments

Mdview and the missing middle between less and Electron

https://blog.leonbecker.de/mdview-and-the-missing-middle-between-less-and-electron/
1•rowbin•4m ago•0 comments

Provenance: A survival toolkit for an AI dominant information landscape

https://vinchenkov.substack.com/p/provenance
1•vinchenkov•6m ago•0 comments

Crucial and Vital Security by Design Principles

https://nocomplexity.github.io/securitybydesign/securityprinciples/
1•runningmike•6m ago•1 comments

Departing Meta Staffer Posts Biting Anti-AI Video Internally Amid Mass Layoffs

https://www.motherjones.com/politics/2026/05/meta-video-ai-training-layoffs-video-exclusive-mci-b...
2•cdrnsf•7m ago•0 comments

Understand Monotonic Deque Pattern Before Practice on LeetCode

https://algo-rhythm.dev/en/monotonic-deque/
5•bytego•12m ago•1 comments

<model-viewer>: Easily display interactive 3D models on the web and in AR

https://modelviewer.dev/
1•Pay08•14m ago•0 comments

SpaceX Is Spending $2.8B to Buy Gas Turbines for Its AI Data Centers

https://www.wired.com/story/elon-musk-spacex-spending-gas-turbines-grok/
2•bookofjoe•14m ago•1 comments

Oops you specified provider but forgot quant

https://github.com/qpwo/openrouter_triples
1•lhmiles•14m ago•0 comments

Shipping a Laptop to a Refugee Camp in Uganda

https://notesbylex.com/shipping-a-laptop-to-a-refugee-camp-in-uganda
1•lexandstuff•15m ago•0 comments

Cloudflare's Matthew Prince says AI has made a category of workers obsolete

https://fortune.com/2026/05/21/cloudflare-ceo-matthew-prince-layoffs-ai-automation-measurers/
3•gpi•16m ago•1 comments

Draft executive order would set deadlines for quantum encryption

https://www.nextgov.com/cybersecurity/2026/05/draft-executive-order-would-set-deadlines-digital-s...
1•Molitor5901•17m ago•0 comments

Dead Metaphor

https://en.wikipedia.org/wiki/Dead_metaphor
1•cainxinth•20m ago•0 comments

Show HN: Microcodegen.py – PRD → FastAPI app, one file, no LLM calls

https://github.com/Anioko/microcodegen
1•anioko1•22m ago•0 comments

Horstine the Whale: An Obituary

https://www.eugyppius.com/p/horstine-the-whale-an-obituary
1•wrqvrwvq•23m ago•0 comments

Measuring LLMs' ability to develop exploits

https://red.anthropic.com/2026/exploit-evals/
2•Kneenex•24m ago•0 comments

Green Card Seekers Must Leave U.S. to Apply, Trump Administration Says

https://www.nytimes.com/2026/05/22/us/politics/green-card-changes-trump.html
7•tlhunter•25m ago•0 comments

My Profile HTTP://Profile.jomvia.com

1•MeherunJessi•26m ago•0 comments

Regular rebuilding of the Ise Shrine due to Shinto principle

https://en.wikipedia.org/wiki/Ise_Shrine
1•b-kf•27m ago•1 comments

Aimeflux – Local-first macOS dictation with searchable transcript history

https://aimeflux.com
1•erdiegoant•30m ago•0 comments

Judge dismisses human smuggling charges against Kilmar Abrego Garcia

https://apnews.com/article/kilmar-abrego-garcia-el-salvador-deportation-smuggling-035a2b2ded3ede6...
3•petethomas•32m ago•0 comments

Use Grok in OpenCode

https://x.ai/news/grok-opencode
2•porridgeraisin•33m ago•0 comments

ABM-101

https://therestlesstechnophile.com/2019/11/08/abm-101/
3•picture•36m ago•0 comments

Viktor Zhdanov

https://worksinprogress.co/issue/the-story-of-viktor-zhdanov/
2•niklasbuschmann•36m ago•0 comments

Netherlands seizes 800 servers of hosting firm enabling cyberattacks

https://www.bleepingcomputer.com/news/security/netherlands-seizes-800-servers-of-hosting-firm-ena...
4•jethronethro•36m ago•0 comments

Show HN: ReTab – a Cmd+Tab-style switcher for Safari tabs

https://apps.apple.com/us/app/retab-tab-switch-for-safari/id6736950080
3•hyouuu•37m ago•0 comments

Notes from the Foothills of the Singularity

https://every.to/playtesting/notes-from-the-foothills-of-the-singularity
2•mooreds•38m ago•0 comments

Universal Paperclips (2017)

https://www.decisionproblem.com/paperclips/index2.html
2•caminanteblanco•45m ago•0 comments