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/

My Opinion on RL

1•umjunsik132•3m ago•0 comments

The Art of Kite Flying (1430–1929)

https://publicdomainreview.org/collection/art-of-kite-flying/
1•benbreen•6m ago•0 comments

Show HN: Woltspace – a lodge for your coding agents

https://www.woltspace.com/
1•jerpint•10m ago•0 comments

GitHub Banned All CI for Our (OSS) Org Because of Bad Drive-By Contributors

2•BlueMatt•10m ago•0 comments

Americans and AI 2026: Chatbots, Smart Devices and Views on Impact

https://www.pewresearch.org/internet/2026/06/17/americans-and-ai-2026-chatbots-smart-devices-and-...
2•toomuchtodo•16m ago•1 comments

Rightwing populist 'El Tigre' wins Colombia election

https://www.ft.com/content/49294716-56be-40a4-ba31-b4e376ccb47f
1•petethomas•17m ago•0 comments

Zombie unicorns are haunting Silicon Valley

https://www.economist.com/business/2026/06/21/zombie-unicorns-are-haunting-silicon-valley
5•andsoitis•19m ago•1 comments

Crossary – AI-assisted field mapping that outputs signed Excel files

https://www.crossary.com
1•migueljpalmeida•20m ago•0 comments

Japan's Toto to invest $495M in chip materials, targeting 1-nm era

https://asia.nikkei.com/business/tech/semiconductors/japan-s-toto-to-invest-495m-in-chip-material...
1•Nrbelex•23m ago•0 comments

Never Too Late

https://stephengbarr.substack.com/p/its-never-too-late-practical-tips
1•SGBmedia•24m ago•0 comments

Remaking BBC test cards to teach you video processing

https://www.youtube.com/watch?v=U_6HxPkrgcg
1•unleaded•25m ago•0 comments

Job application asked for my SAT scores

https://mrmarket.lol/job-application-asked-for-my-sat-scores/
2•mrmarket•25m ago•0 comments

2k retired Google Pixel phones get a second life as a private cloud

https://www.theregister.com/on-prem/2026/06/18/2000-retired-google-pixel-phones-get-a-second-life...
2•joebuckwilliams•27m ago•0 comments

Early prototype of Stonehenge unearthed 3 miles from prehistoric landmark

https://www.nbcnews.com/world/united-kingdom/stonehenge-united-kingdom-prehistoric-prototype-summ...
2•gmays•33m ago•1 comments

Keogram: The Sky in 2025

https://apod.nasa.gov/apod/ap260621.html
1•mef51•33m ago•0 comments

Entity Core Protocol

https://github.com/EntityChurch/entity-core-protocol/blob/master/specs/ENTITY-CORE-PROTOCOL.md
1•billatbillslab•36m ago•1 comments

You're probably using Agent Skills wrong

https://notes.ansonbiggs.com/youre-probably-using-agent-skills-wrong/
2•MisterBiggs•44m ago•0 comments

Hacking their bodies for a longer life: is there science behind their methods?

https://www.nature.com/articles/d41586-026-01884-z
2•olalonde•47m ago•0 comments

World-first catch: new shark species

https://www.eurekalert.org/news-releases/1132305
2•gmays•51m ago•0 comments

Show HN: Baserates.dev, memorize programmer napkin math

https://www.baserates.dev/
1•stopachka•55m ago•0 comments

The Doom Justifies the Valuation

https://geohot.github.io//blog/jekyll/update/2026/06/21/the-doom-justifies-the-valuation.html
33•inatreecrown2•1h ago•17 comments

The Next Black President

https://www.vanityfair.com/story/the-next-black-president
7•Kapura•1h ago•0 comments

Ask HN: Are you being "529 Overloaded" by Anthropic too?

4•hmokiguess•1h ago•1 comments

QEMU with Espressif

https://github.com/espressif/qemu
2•arbayi•1h ago•0 comments

Older iPhones are vulnerable to a flaw Apple likely can't fix

https://mashable.com/tech/older-iphones-vulnerable-to-a-flaw-apple-cant-fix
3•gnabgib•1h ago•0 comments

Claude: Elevated Error Rates for Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6

https://status.claude.com/incidents/lv35v0q9nsj2
32•forks•1h ago•35 comments

(Reverse Engineering) Apple Internals: Swift in the Kernel

https://blog.calif.io/p/apple-internals-swift-in-the-kernel
3•dnw•1h ago•0 comments

1983 Northern Telecom Commodore Phone

https://www.oldtelephoneroom.ca/1983-northern-telecom-commodore-phone/
12•arexxbifs•1h ago•2 comments

Give your sandboxed agents API keys they can't read

https://www.superserve.ai/blog/introducing-secrets/
2•Amit_Patil_010•1h ago•0 comments

Better Grammar – Grammar Practice for Adults

https://benkaiser.github.io/better-grammar/
3•benkaiser•1h ago•0 comments