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/

The Hand of Aaron – Harold Cohen's Freehand Line Algorithm

https://www.rightclicksave.com/article/the-hand-of-aaron-harold-cohens-freehand-line-algorithm-aa...
1•smusamashah•14s ago•0 comments

Tell HN: OpenAI Is a Worthless Company

1•_OpenGayEye•36s ago•0 comments

Global warming will exceed 1.5-degree limit, UN says

https://www.pbs.org/newshour/science/global-warming-will-exceed-1-5-degree-limit-un-says-in-repor...
1•ijidak•1m ago•0 comments

A billionaire was accused of stealing Malibu sand settlement

https://www.latimes.com/california/story/2026-09-04/billionaire-was-accused-of-stealing-malibu-sa...
1•axiomdata316•2m ago•0 comments

Show HN: SimDuck – Multiplayer Football with MicroDucks

https://fpvsim.com/sim-duck
1•mosfets•5m ago•0 comments

U.S. Used Promise of Nvidia Chips to Broker Armenia-Azerbaijan Peace Deal

https://www.wsj.com/world/u-s-used-promise-of-nvidia-chips-to-broker-armenia-azerbaijan-peace-dea...
1•bilkoo•7m ago•0 comments

Postgres Calculations and the Ambiguity of Null

https://www.crunchydata.com/blog/postgres-calculations-and-the-ambiguity-of-null
3•craigkerstiens•10m ago•0 comments

NOS4: A recreation of iOS 4, running in the browser

https://github.com/1etu/nos4
1•thunderbong•13m ago•0 comments

What programming "best practice" do you think is wrong?

https://textlog.cc/post/3226
2•stagas•15m ago•1 comments

Paygate – a non-custodial paywall AI agents pay each other with (USDC on Base)

https://tollbooth402--691ab20aa91411f1867b1607ee4eb77e.web.val.run
1•sololevelingsof•16m ago•0 comments

Show HN: Yulin Local AWS Simulator

https://yulinsim.dev/
3•xiuyuan•16m ago•0 comments

Micro-Fabrication with a Fiber Tip – A Low-Cost 3D Micro Printing Method [video]

https://www.youtube.com/watch?v=UvV2CH5il3Q
1•Matt-Hayes•21m ago•0 comments

Some Scientists Have 'Magic Hands' in the Lab. This A.I. Is Learning Why.

https://www.nytimes.com/2026/08/27/science/scientists-experiments-replication-ai.html
1•bookofjoe•27m ago•1 comments

PushVideoAI – Turn PDFs and prompts into digital products instantly

https://pushvideoai.com/
1•susannadavidkel•27m ago•0 comments

New Social Network

https://vulpine.pw/
1•AJesdizahozao•28m ago•2 comments

Mullvad Shuts Down Public Encrypted DNS Servers and Sponsors Quad9 Instead

https://digitalescapetools.com/2026/09/mullvad-shutting-down-dns-quad9.html
2•xabd•28m ago•0 comments

Replacing a Rust Enum with a 64-Bit Word Made My Interpreter 17% Faster

https://pointersgonewild.com/2026-08-25-replacing-a-rust-enum-with-a-64-bit-word/
2•metrofun•31m ago•0 comments

Nvidia is driving the AI boom. Good

https://www.economist.com/leaders/2026/09/03/nvidia-is-driving-the-ai-boom-good
1•Anon84•31m ago•0 comments

Terminal.army

https://terminal.army/
1•ncdlek•33m ago•1 comments

The jobs apocalypse is postponed. An AI jobs boom is here

https://www.economist.com/finance-and-economics/2026/09/04/the-jobs-apocalypse-is-postponed-an-ai...
1•Anon84•33m ago•0 comments

Microsoft Project Zenith: A ready-to-code Windows setup for developers

https://blogs.windows.com/windowsdeveloper/2026/09/04/announcing-project-zenith-the-ready-to-code...
3•CoderLim110•34m ago•0 comments

A bizarre Commodore 64 peripheral, a mime, and some pretty bad ads

https://buttondown.com/suchbadtechads/archive/spartan-and-the-mime/
2•rfarley04•39m ago•1 comments

Gleam and BEAM- Looking beyond the JVM [video]

https://vimeo.com/1223666800
1•kamilap•39m ago•0 comments

SchedBlame: Culprit-Attributed CPU Contention on Stock Kernels

https://arxiv.org/abs/2609.02052
1•torsi0n•40m ago•0 comments

Self Aware Models Win

https://paperclips.blog/dario-is-most-self-aware
1•andytratt•43m ago•1 comments

Juraslip Park

https://github.com/panglesd/slipshow/releases/tag/v0.13.0
1•panglesd•44m ago•0 comments

New method predicts where massive earthquakes will strike

https://news.ucr.edu/articles/2026/09/04/new-method-predicts-where-massive-earthquakes-will-strike
1•geox•45m ago•0 comments

Xxcancel.com – redirect to a working nitter instance

3•DavCreator•46m ago•0 comments

Billionaires Are Funding 'Anti AI' Content [video]

https://www.youtube.com/watch?v=mzlu4FSXBNw
2•blurbleblurble•46m ago•0 comments

StackKit – In-depth index of low-exposure open-source dev tools

https://stackkit.website/
1•StackKit•48m ago•0 comments