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/

People are reading too much into the gov advisories and listening to conjecture

https://twitter.com/RGB_Lights/status/2128484066400047581
1•espeed•1m ago•0 comments

NSA Asks AI Labs to Please Stop Trying to Break Cryptography

https://gizmodo.com/nsa-asks-ai-labs-to-please-stop-trying-to-break-cryptography-2000848817
3•DGAP•4m ago•1 comments

Skydance prepares for layoffs after Warner Bros. merger

https://www.msn.com/en-us/money/general/skydance-prepares-for-massive-layoffs-after-warner-bros-m...
1•petethomas•4m ago•0 comments

Ford issues recall after exhaust leaks kill two

https://arstechnica.com/cars/2026/12/ford-recalls-704000-light-trucks-after-two-deaths-from-carbo...
1•bookmtn•6m ago•0 comments

Jeff Bezos Is Giving Away His AI for Free. Here's Why [video]

https://www.youtube.com/watch?v=e9w-cutHG4c
2•Bender•8m ago•1 comments

eBPFOS: Compile Linux into eBPF and make it a dynamically composable OS

https://github.com/eunomia-bpf/ebpfos
2•matt_d•8m ago•0 comments

LUI – Make Native Apps in Linux and Windows with Roblox Luau

https://github.com/gmoddev/LUI/releases
1•LUIDeveloper•10m ago•0 comments

Show HN: Lurka, open-source tool to find buyers among people engaging on X

https://github.com/getcargohq/lurka
2•auree•11m ago•0 comments

Samenland: Multiplayer settlement game set in Northern Germany around 1500 (MIT)

https://github.com/retrogames23/samenland
2•doener•12m ago•0 comments

Mapping a Hospital Desert in the US using R

https://datascienceplus.com/mapping-a-hospital-desert-in-r/
1•kkk4seis•12m ago•0 comments

GitHub: Incident with Actions

https://www.githubstatus.com/incidents/v78mpshn6902
1•bygosh•13m ago•0 comments

Ask HN: Any Update from Google and Microsoft on PQC?

2•jono_wilson•16m ago•0 comments

Certificate Transparency Search: All CT Logs, Free JSON API

https://ctlogs.dev/
1•sea-gold•16m ago•0 comments

1,711 unbranded shopping questions to ChatGPT: 7 in 10 brands named once

https://tryagentpilot.com/benchmark
1•useagentpilot•16m ago•0 comments

Show HN: A game I made to practice the word of the day in a sentence

https://jspann.me/projects/words/
2•jspann•20m ago•0 comments

Show HN: Acceptance Engineering – Warehouse handoff in a synthetic test

https://illaa.ai/workflow-verification/
1•RizAIsystems•20m ago•0 comments

Post-Literate Society

https://en.wikipedia.org/wiki/Post-literate_society
3•gregsadetsky•25m ago•0 comments

I Quit Big Tech to Build with AI – Both the Doomers and Hype Crowd Are Wrong

https://drawsolve.com/blog/building-with-ai
19•James_Stryker_D•25m ago•5 comments

Stylometric Fingerprinting Redux

https://seirdy.one/posts/2022/07/09/stylometric-fingerprinting-redux/
2•ykgoon•26m ago•0 comments

The Brain-LLM: a language model that reads EEG

https://mind.sabi.com/about
2•ogundipeore•28m ago•0 comments

Google just exposed OpenAI and Anthropic [video]

https://www.youtube.com/watch?v=_Bk0_Dt6TPg
3•Bender•32m ago•0 comments

U.S. Lawmakers Are Poised to Keep Chinese Cars Out Through 2042

https://www.wsj.com/business/autos/u-s-lawmakers-are-poised-to-keep-chinese-cars-out-through-2042...
6•bookofjoe•34m ago•2 comments

Show HN: Does your browser/SSH client use post-quantum key exchange?

https://amipostquantum.com/
2•keito•35m ago•2 comments

Show HN: Readback – hear Claude Code and approve its prompts by voice

https://github.com/badedokun/readback
2•terramind•35m ago•0 comments

On Human Agency

https://scholarstage.substack.com/p/thoughts-on-human-agency
2•jger15•36m ago•1 comments

Show HN: Detached – Share a Git repo without the BS

https://detached.to/
2•pwnicholls•39m ago•0 comments

Harvest Now, Decrypt Later

https://en.wikipedia.org/wiki/Harvest_now,_decrypt_later
1•chistev•44m ago•0 comments

What Bill Gates Expects from AI

https://www.economist.com/business/2026/12/03/what-bill-gates-expects-from-ai
1•doener•46m ago•0 comments

Llama Runner and Chat client/harness

2•merlinwarage•47m ago•0 comments

The post-quantum right answers for December 2026

https://www.latacora.com/blog/post-quantum-right-answers-december-2026/
6•DASD•47m ago•1 comments