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/

The flame graph was wrong by 57×. So I'm building a profiler

https://minogin.com/the-flame-graph-was-wrong-by-57x-so-im-building-a-profiler/
1•minogin•3m ago•0 comments

Deployah v0.8.0: tasks, CronJobs, and an init wizard

https://deployah.dev/
4•atkrad•4m ago•0 comments

Fast Kernel Headers (2022)

https://lwn.net/ml/linux-kernel/YdIfz+LMewetSaEB@gmail.com/
1•tosh•5m ago•0 comments

Where will RISC-V be in 20 years? Poll results

https://thechipletter.substack.com/p/where-will-risc-v-be-in-20-years
1•klelatti•10m ago•0 comments

Show HN: Bags for Your Coins

https://www.21bags.io/
1•npguy•10m ago•0 comments

Show HN: Use AI API and scheduled Active Recall to pass any exam: LongTerMemory

https://longtermemory.com
1•aledevv•11m ago•0 comments

Show HN: Connection-Agnostic Presence Tracking for Distributed Back End

https://zenodo.org/records/21717242
1•duckydude20•11m ago•0 comments

Pmarca Guide to Personal Productivity (2007)

https://pmarchive.com/guide_to_personal_productivity.html
1•tosh•13m ago•0 comments

Internet Movie Cars Database

https://www.imcdb.org
1•dewey•16m ago•0 comments

Clean up your Android TV

https://tv.cobanov.dev/
1•giuliomagnifico•16m ago•0 comments

Three Common Misconfigurations in DMARC, BIMI, and SPF Records

https://senderledger.com/articles/three-common-misconfigurations-dmarc-bimi-spf
1•adulion•16m ago•0 comments

NATO DIANA announces 15 innovators to move forward to Mission Track

https://foxandlion.pub/news/nato-diana-announces-full-cohort-of-15-innovators-to-move-forward-to-...
5•ewfeber•20m ago•0 comments

Not a Translator

https://akgang-rgb.github.io/NotaTranslator/
1•akgang•20m ago•1 comments

Why the stock market bubble is likely to burst [video]

https://www.youtube.com/shorts/wdBEU87mCnU
1•thelastgallon•22m ago•0 comments

Sality Malware Disrupted in International Cyber Takedown

https://www.justice.gov/usao-cdca/pr/sality-malware-disrupted-international-cyber-takedown
1•doener•24m ago•0 comments

Do you remember Silicon Valley bro app?

https://brocoach.win/
1•harshalone•26m ago•1 comments

SoulAuth – Rust identity infrastructure for humans and AI agents

https://github.com/TrantorLabs/SoulAuth
2•Aziell•27m ago•0 comments

Riemann Hypothesis: Improved to 67.251

1•TakayukiKomada•28m ago•0 comments

Chippytea

https://www.chippytea.com
2•mcilroy•28m ago•0 comments

RFC9369: QUIC Version 2

https://www.rfc-editor.org/rfc/rfc9369.txt
1•tosti•29m ago•0 comments

Fable 5.1, Enterprise Frontier Safeguards

https://stratechery.com/2026/fable-5-1-enterprise-frontier-safeguards/
1•swolpers•29m ago•0 comments

Quasar 438B: Europe's Leading AI Model

https://multiversecomputing.com/resources/introducing-quasar-438b-europe-s-leading-ai-model
1•amunozo•29m ago•0 comments

LongCat-2.0 is now free to try in cline

https://twitter.com/Meituan_LongCat/status/2094996391387111865
1•oliviayii•34m ago•0 comments

Fake 10 Downing St (UK PM home) listing on Booking.com shows security failures

https://www.theguardian.com/money/2026/sep/02/fake-10-downing-street-listing-booking-com-highligh...
2•robaato•37m ago•1 comments

PDF4WCAG 1.12: PDF Accessibility Validation for WCAG and PDF/UA

https://pdf4wcag.com/blog-news/pdf4wcag-release-1.12
1•smartdev01•38m ago•3 comments

Can LLMs Discover Scientific Laws in Real and Parallel Worlds?

https://yiyihum.github.io/SciLaws-Bench/
1•root-parent•41m ago•1 comments

Banca Etica Suspends A/I's Account While Condemning the Sanctions Behind It

https://sabot.media/post/banca-etica-statement-english
2•rendx•41m ago•0 comments

1 in 5 job listings are likely to be ghost jobs

https://www.remoterocketship.com/advice/ghost-jobs-report/
1•Lior539•41m ago•0 comments

Pystebin: Executable Pastebin for Python in the Browser

https://www.pystebin.com/
2•BiteCode_dev•42m ago•1 comments

Fomu An FPGA board that fits inside your USB port

https://www.crowdsupply.com/sutajio-kosagi/fomu
1•Bluestein•43m ago•0 comments