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: Skred – my opinionated sound/pattern engine and live coding thingy

https://octetta.github.io/pulp/doc/show-hn-1.html
2•octetta•7m ago•0 comments

Show HN: Runtime and install-time enforcement for NPM dependencies`

https://github.com/kratex-security/kratex
2•jackbeck•7m ago•0 comments

ActHub – EU AI Act compliance toolkit for small businesses (PHP, no framework)

https://sevinhub.com/acthub/
2•sergiuv•13m ago•0 comments

EPP spreading false claims on Chat Control

https://digitalcourage.social/@echo_pbreyer/116866154678577185
3•latexr•13m ago•0 comments

All Your Favorite Gadgets Are Getting More Expensive Again

https://www.wired.com/story/we-are-in-the-knockout-round-of-price-increases-for-consumer-electron...
2•joozio•15m ago•0 comments

Show HN: PES Benchmark v0.2 – Detecting AI-generated motion (Cohen's d=10.4)

https://github.com/myshapeprotocol/myshape-protocol
2•myshapeprotocol•15m ago•0 comments

Europe's air conditioning culture wars heat up

https://www.theguardian.com/environment/2026/jul/05/europe-air-conditioning-culture-wars-heat-up
2•tosh•18m ago•0 comments

Confidential computing's core trust mechanism is broken. The fix may not exist

https://www.theregister.com/security/2026/07/04/confidential-computings-core-trust-mechanism-is-b...
3•Logans_Run•21m ago•1 comments

Codex ticket: first-class Jujutsu support

https://github.com/openai/codex/issues/31167
3•xlii•22m ago•1 comments

Returning to Zig after losing trust in Rust's governance

https://gracefulliberty.com/articles/return-to-zig/
4•jonathandeamer•22m ago•1 comments

Instagram running ads promoting child abuse material in India [video]

https://www.youtube.com/watch?v=6-y726qvZ6Q
2•mgh2•25m ago•1 comments

Show HN: Open-source phone calling infra for AI agents

https://github.com/AgentLineHQ/AgentLine
3•sameersri2004•27m ago•0 comments

Pi square is nearly 10

https://mihai.page/pi-square-is-10/
3•freediver•28m ago•0 comments

Ukraine striking Russian energy infrastructure at unprecedented rate

https://www.ft.com/content/13687b48-9e54-44a1-bd4d-600bbc052baf
3•JumpCrisscross•34m ago•0 comments

Ford rehires human engineers after AI fails to match quality checks

https://www.bbc.com/news/articles/cgrkd41n2v9o
5•JumpCrisscross•36m ago•0 comments

Suezmax

https://en.wikipedia.org/wiki/Suezmax
2•thunderbong•41m ago•0 comments

Show HN: Design Patterns for AI

https://verificationdesign.com/
2•verify-ai•42m ago•1 comments

OpenAI's apparent failure to visit key site raises questions over UK investment

https://www.theguardian.com/technology/2026/jul/04/openai-apparent-failure-visit-key-site-questio...
2•YeGoblynQueenne•43m ago•0 comments

Show HN: Pixtrava – Public Profiles for Our Persistent 3D Voxel World

https://pixtrava.com/blog/public-profiles-launch
2•sbcom•44m ago•0 comments

Common 3D Benchy Problems, Causes and Fixes

https://bambu3design.com/13-common-3d-benchy-problems-causes-fixes/
3•ehsanamel•44m ago•1 comments

Japan's Hayabusa2 probe to conduct flyby of Torifune asteroid

https://www3.nhk.or.jp/nhkworld/en/news/20260705_01/
2•dvh•45m ago•0 comments

Show HN: Selbstbild – What Fable 5 thinks of your HN comment history

https://selbstbild.eu
3•Topfi•57m ago•1 comments

Skill > ~2.5-3X PNG > OCR > paint in QR

https://github.com/YogiSotho/dense-image-gen
3•yogisotho•1h ago•0 comments

New Weekly Space and Hypersonics Engineering Newsletter

https://buttondown.com/MaxQFrontier/archive/from-orbital-data-farms-to-hypersonic-prints-this/
3•chadsutter•1h ago•1 comments

Teaching Claude to Write Like Zweig

https://rornic.dev/posts/teaching-claude-to-write-like-zweig/
5•rornic•1h ago•2 comments

Sedentarism Exhibits a Distinct Mitochondrial Bioenergetic Phenotype

https://www.mdpi.com/3042-5158/2/3/10
3•bookofjoe•1h ago•0 comments

Self Hosted NAS Platform

https://github.com/benjaminjaklic/NAS_readme
3•user1256•1h ago•1 comments

Diffflow.com: Visual-Selector

https://diffflow.com/blog/visual-selector/
3•7rin0•1h ago•0 comments

If You Can Write Acceptance Criteria, You Can Write an AI Routing Policy

https://age-of-product.com/ai-routing-policy/
3•swolpers•1h ago•0 comments

Show HN: ChartsPrintables – printable conversion charts and reference tables

https://chartsprintables.com
3•robot1996•1h ago•0 comments