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/

Canadian Nuclear FAQ

https://www.nuclearfaq.ca/
1•leonidasrup•33s ago•0 comments

Minutes journalist accuses CBS News of penalizing her

https://www.theguardian.com/media/2026/may/27/60-minutes-sharyn-alfonsi
1•pjmlp•1m ago•0 comments

Snooze: Run a Command at a Particular Time

https://github.com/leahneukirchen/snooze
1•thunderbong•2m ago•0 comments

The Pope Grasps the Limits of AI

https://www.theatlantic.com/ideas/2026/05/pope-leo-ai-catholic-church/687298/
1•rbanffy•5m ago•0 comments

Former Google and Apple Researchers Launch a Startup to Build AI's Missing Feed

https://www.wired.com/story/ex-google-apple-ai-researchers-want-to-make-ai-that-gets-smarter-as-y...
1•joozio•5m ago•0 comments

Wix to cut 1k jobs in largest layoff round in company history

https://www.calcalistech.com/ctechnews/article/b1oebi11xge
1•doppp•14m ago•0 comments

S.F. startup Webflow announces abrupt round of layoffs

https://www.sfchronicle.com/tech/article/webflow-layoffs-tech-san-francisco-22279561.php
1•doppp•14m ago•0 comments

Optimizing Our ML Feature Store: Cutting Compute Costs

https://kayhan.dev/posts/015-optimizing-ml-feature-store-cutting-compute-costs/
1•keynha•16m ago•0 comments

Rust Will Save Linux from AI, Says Greg Kroah-Hartman

https://linux.slashdot.org/story/26/05/27/208203/rust-will-save-linux-from-ai-says-greg-kroah-har...
2•fork-bomber•19m ago•0 comments

The Lone Lisp Heap

https://www.matheusmoreira.com/articles/lone-lisp-heap
1•matheusmoreira•31m ago•0 comments

Australia launches $2B lawsuit over PFAS 'forever chemicals'

https://www.rnz.co.nz/news/world/596604/australia-launches-massive-2b-lawsuit-over-pfas-forever-c...
1•colinprince•33m ago•0 comments

A Eureka machine that thinks like nature and explores what AI cannot

https://iisc.ac.in/a-eureka-machine-that-thinks-like-nature-and-explores-what-ai-cannot/
3•kunalsin9h•33m ago•0 comments

Japan, South Korea and Taiwan are suffering industrial rot

https://www.economist.com/finance-and-economics/2026/05/27/japan-south-korea-and-taiwan-are-suffe...
1•jnord•35m ago•1 comments

Predicting the 2026 World Cup: Can Anyone Stop Spain?

https://dtai.cs.kuleuven.be/sports/blog/predicting-the-2026-world-cup:-can-anyone-stop-spain/
1•fvankers•43m ago•0 comments

Musk's cut to USAID have made the Ebola outbreak worse

https://www.dw.com/en/ebola-central-africa-us-aid-cuts-uganda-drc-who-vaccines/a-77233437
6•camillomiller•43m ago•0 comments

Can Intel Save America?

https://www.thefp.com/p/can-intel-save-america
1•jazzdev•46m ago•0 comments

SlimTide Exploding in 2026: Viral Weight Management Trend

https://finance.yahoo.com/sectors/healthcare/articles/slimtide-capsules-exploding-2026-slim-19370...
1•farqnaht•48m ago•0 comments

1-Click RCE in Flowise (CVE-2026-40933)

https://www.obsidiansecurity.com/blog/when-is-stdio-mcp-actually-a-vulnerability
1•13ph03nix•49m ago•0 comments

Dispatches from the possibly last days of human relevance

https://scottaaronson.blog/?p=9782
1•gone35•51m ago•0 comments

Don't Delegate the Joy of Building to AI

https://bacist.com/joy-of-building/
2•baCist•51m ago•3 comments

Websites have a new way to spy on visitors: analyzing their SSD activity

https://arstechnica.com/security/2026/05/websites-have-a-new-way-to-spy-on-visitors-analyzing-the...
2•XzetaU8•54m ago•1 comments

Where is API tooling lacking?

1•dhruv3006•54m ago•1 comments

Omniclip: Open-source, powerful video editor right in the browser

https://github.com/omni-media/omniclip
1•maxloh•54m ago•0 comments

Halted ARM64 Port Work

https://github.com/rcarmo/haiku-arm64-build
1•rcarmo•56m ago•0 comments

I Stopped Designing Forms for Only Humans

https://www.indiehackers.com/post/i-stopped-designing-forms-for-only-humans-893ed23599
1•Lovanut•56m ago•0 comments

A one-word answer to why EU lost control of Big Tech: Ireland

https://euobserver.com/218423/a-one-word-answer-to-why-eu-lost-control-of-big-tech-ireland/
2•nemoniac•59m ago•1 comments

Is it better to have fewer components?

https://alokit.substack.com/p/four-components-each-90-reliable
1•avikalp•1h ago•1 comments

UK's rudest chalk figure gets a glow-up to stop it fading in the rain

https://www.bbc.co.uk/news/articles/cpvppe84lnvo
2•FartyMcFarter•1h ago•0 comments

Space, time and Shakespeare – Paul Glendinning [video]

https://www.youtube.com/watch?v=iMHvwhXFrNQ
1•vismit2000•1h ago•0 comments

Breaking macOS App Sandbox with Archive Utility

https://mysk.blog/2026/05/19/cve-2026-28910/
1•goranmoomin•1h ago•0 comments