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/

Drug use may have begun 25,000 years ago in Indonesia, research finds

https://www.bbc.com/news/articles/cd792nll91eo
1•cisc•43s ago•0 comments

The under-35s shaping the future of biotech

https://www.technologyreview.com/2026/09/11/1143834/meet-the-under-35s-shaping-the-future-of-biot...
1•joozio•2m ago•0 comments

Xteink says they will include USB-C ports on future devices – Good e-Reader

https://goodereader.com/blog/electronic-readers/xteink-says-they-will-include-usb-ports-on-future...
1•edward•2m ago•0 comments

Show HN: You can't read every ToS, but the clanker can

https://github.com/PAndreew/termsinator
1•PAndreew•2m ago•0 comments

Maptap.gg – Daily Geography Game

https://maptap.gg/
1•embedding-shape•8m ago•0 comments

Does "rtk" skill cut agent tokens by 60–90%? We tested it

https://blog.jetbrains.com/ai/2026/07/rtk-claude-code-token-savings/
1•touristtam•9m ago•0 comments

Empirical Research on Moe Safety Mechanisms

https://dealign.ai/
1•Bluestein•10m ago•0 comments

Noodle Computer – Share Linux Desktops with AI Agents on Your Mac

https://xcancel.com/antibot/captcha
1•_pdp_•11m ago•2 comments

Claude is no longer available for minors

https://support.claude.com/en/articles/15171100-age-assurance-on-claude
2•Muhammad523•15m ago•0 comments

We made Bryntum Gantt look handmade with realtime image diffusion

https://bryntum.com/blog/we-made-bryntum-gantt-look-handmade-with-realtime-image-diffusion/
1•ritzaco•16m ago•0 comments

Show HN: Quickly generate and explain complex shell commands

https://crates.io/crates/watn
1•buster•16m ago•0 comments

Gold-Plating (EU Law)

https://en.wikipedia.org/wiki/Gold-plating_(EU_law)
1•doener•17m ago•0 comments

Sourcerer: Version 1.0.19 Released

https://www.sourcererapp.com/
1•dezelin•19m ago•1 comments

Down Quark

https://en.wikipedia.org/wiki/Down_quark
1•binyu•20m ago•0 comments

Anthropic Says Yemen Group Used Claude in Missile Development

https://www.bloomberg.com/news/articles/2026-09-11/anthropic-says-yemen-group-used-claude-in-miss...
2•helsinkiandrew•22m ago•0 comments

Hypen – Native crossplatform UI framework

https://hypen.space/blog/introducing-hypen
1•hypendev•23m ago•0 comments

textlog is now available on F-Droid

https://f-droid.org/packages/dev.serge.textlog/
1•stagas•25m ago•0 comments

Ask HN: Is learning C++ enough to start researching Hardware interactions?

1•skwasimin•26m ago•0 comments

Anthropic says it blocked possible attempts to use AI to develop bioweapons

https://www.cnn.com/2026/09/10/health/anthropic-bioweapons-report
2•cisc•27m ago•0 comments

It's not the YAML spec's fault, but

https://slugcat.systems/post/26-09-10-yaml-spec/
2•birdculture•27m ago•0 comments

ChatGPT for Financial Services

https://openai.com/index/introducing-chatgpt-financial-services/
2•ijidak•31m ago•0 comments

Gitwal – GitHub Event Archive

https://gitwal.com
1•mihau•35m ago•0 comments

Robots Are Learning to Feel

https://spectrum.ieee.org/tactile-data-robots
1•marc__1•38m ago•0 comments

Gavin Newsom imposes strict new rules on AI, social media, chatbots for children

https://www.theguardian.com/media/2026/sep/10/gavin-newsom-social-media-bill
2•dgellow•39m ago•1 comments

Unless there is a coordinated slowdown, human extinction seems likely

https://x.com/Marcus_J_W
2•milkshakes•40m ago•0 comments

Mining Qwen 3.8 reasoning trace for prompt/skill evaluation

https://olegivye.com/#/article/confusion-evaluation
1•olekrk•41m ago•0 comments

Show HN: Arcstone – Fail-closed local runtime with sub-12ms execution bounds

https://github.com/trencinodin-stack/arcstone-continuity-core
2•Founderarcstone•42m ago•0 comments

Resist "AI"

https://ronjeffries.com/articles/-v026/x/t/
18•mborch•43m ago•6 comments

The Newsroom That Conducted Its Own Cancer Study

https://www.cjr.org/laurels-and-darts/the-newsroom-that-conducted-its-own-cancer-study-keyport-ne...
2•Tomte•44m ago•0 comments

An adult AI image, video and companion chat platform [NSFW AI]

https://aifapper.com
1•gptguru•46m ago•0 comments