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: UnfoldCMS – self-hosted Laravel CMS, one-time pricing, no subscriptions

https://unfoldcms.com
1•hpakdaman•2m ago•0 comments

Trump threatens 100% tariff on European countries that impose digital tax

https://apnews.com/article/trump-tariff-europe-d2007fee8ae733a15f240c5f83462c96
1•leonidasrup•4m ago•0 comments

Flounder Mode

https://colossus.com/article/flounder-mode/
1•skadamat•4m ago•0 comments

SHOW HN: Experimental GCC/GAS inline assembly bridge for Python

https://pypi.org/project/sfpy-asm/0.1.1/
1•sunuhwang•4m ago•0 comments

Yourbrowsercandoit – 64 file tools, free, no upload, no signup, no tracking

https://yourbrowsercandoit.com/
1•robhati•7m ago•1 comments

Ask HN: How do I capture the right audience and find the product market fit

3•akarshhegde18•8m ago•0 comments

Build your own vulnerability harness

https://blog.cloudflare.com/build-your-own-vulnerability-harness/
2•talboren•12m ago•0 comments

SmartTAR – STAR 1.2.2

https://github.com/eco-by-different/smarttar-star/releases/download/SmartTAR/SmartTAR.1.2.2.exe
1•e_b_d•13m ago•1 comments

Pelican playing a violin. How to create SVGs with AI

https://furstenheim.substack.com/p/creating-svgs-with-ai
2•furstenheim•13m ago•0 comments

The jank Programming Language [book]

https://book.jank-lang.org/index.html
1•AlexeyBrin•14m ago•0 comments

One Million Passports Leaked Online

https://www.schneier.com/blog/archives/2026/06/one-million-passports-leaked-online.html
4•jruohonen•14m ago•1 comments

Show HN: Cjam – A non-destructive MP3 editor

https://github.com/cutandjoin/Cjam/releases/tag/v2500
1•cutandjoin•17m ago•0 comments

When Cybercriminals Hire Burglars

https://www.cnn.com/2026/06/27/politics/cybercriminals-hire-burglars-russian-us-law-firms
1•cainxinth•17m ago•0 comments

Any suggestions or open source tools that capture the screen

2•adithyaharish•24m ago•6 comments

Show HN: DepGuard, Visualize and simulate NPM vulnerability blast radiuses

https://github.com/EgglezosHub/DepGuard
1•DimitrissEgg1•27m ago•0 comments

Cate Blanchett is taking on AI

https://www.euronews.com/culture/2026/06/24/cate-blanchett-launches-free-tool-to-help-people-prot...
1•CWhiting•28m ago•0 comments

Show HN: AgentWatch – Prevent runaway AI agents with runtime budget enforcement

https://agent-watch.dev/
1•Mohil_Sharma•28m ago•0 comments

Forwarded Header Sabotage (2022)

https://adam-p.ca/blog/2022/03/forwarded-header-sabotage/
2•rdpintqogeogsaa•30m ago•0 comments

Streamline C++ Code Intelligence Setup in Copilot CLI

https://devblogs.microsoft.com/cppblog/streamline-c-code-intelligence-setup-in-copilot-cli/
1•ibobev•31m ago•0 comments

FCC accused of hiding Chairman Carr's messages with DOGE and Musk

https://arstechnica.com/tech-policy/2026/06/fcc-accused-of-hiding-chairman-carrs-messages-with-do...
4•rbanffy•31m ago•0 comments

Kalyazin RT-64 Radio Telescope: Russia's Gateway to the Cosmos

https://www.thedefensenews.com/Kalyazin-RT-64-Radio-Telescope-Russias-Gateway-to-the-Cosmos/
2•thunderbong•31m ago•1 comments

The Process of Smart Note-Taking: Connecting Zettelkasten, Owning with Plaintext

https://www.ssp.sh/blog/process-smart-note-taking/
2•zazuke•33m ago•0 comments

BlackBerry Staged a Comeback by Winning over Car Companies

https://thewalrus.ca/how-blackberry-staged-a-comeback-by-winning-over-car-companies/
2•pseudolus•34m ago•0 comments

Free The Icons: Apple should end their prohibition on shapes in macOS app icons

https://weblog.rogueamoeba.com/2026/06/26/free-the-icons/
3•ksec•34m ago•0 comments

I Could Have Built This in 4 Hours (?). I'm Glad I Didn't

https://www.indiehackers.com/post/i-could-have-built-this-in-4-hours-i-m-glad-i-didn-t-NDpvtFsJ2E...
1•veno_es•34m ago•1 comments

The Donk-Ing of a Truth Machine

https://www.nytimes.com/2026/06/28/business/donk-polymarket-prediction-markets.html
1•cainxinth•35m ago•0 comments

How and why I laser-engraved a self-portrait by Claude Opus 4.6

https://www.lesswrong.com/posts/Xak4zQ4sZtEiHKuqE/how-and-why-i-laser-engraved-a-self-portrait-by...
2•joozio•36m ago•0 comments

Regent: A Differentiable Graph-Based Quant Trading Pipeline (VQ-VAE and GNNs)

https://regent-system.netlify.app/
1•PanzerPeter•38m ago•0 comments

South Korea plans to train military as "drone warriors"

https://arstechnica.com/ai/2026/06/south-korea-plans-to-train-entire-military-as-drone-warriors/
2•rbanffy•38m ago•0 comments

Claude Fable 5: What Our Red Team Found Before the Plug Got Pulled

https://www.reco.ai/blog/inside-claude-fable-5-red-team-findings
3•llmacpu•41m ago•0 comments