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/

P99 0ms* Autocomplete

https://ruurtjan.com/articles/p99-0ms-autocomplete-for-240-million-domain-names
1•pul•4m ago•0 comments

Meta to invest $900M in India's CRED, taps founder to lead WhatsApp

https://www.reuters.com/world/india/indian-fintech-firm-cred-raise-900-million-meta-45-billion-va...
1•rakkhi•4m ago•0 comments

Car Hacking with Claude Code

https://www.csselectronics.com/pages/can-bus-reverse-engineering-ai-llm-claude
1•martinfalch•4m ago•0 comments

Europol is going rogue – so Brussels is doubling its budget?

https://euobserver.com/222391/europol-is-going-rogue-so-brussels-is-doubling-its-budget/??
2•austinallegro•9m ago•0 comments

Vietnamese US deportee returns home after a year in South Sudan

https://www.eyeradio.org/joyful-to-return-home-vietnamese-us-deportee-returns-home-after-a-year-i...
2•_tk_•10m ago•0 comments

Signed OKF – Provenance for Google's Open Knowledge Format

https://github.com/dynamicfeed/signed-okf
2•dynamicfeedai•12m ago•0 comments

Ian Fleming Explains How to Write a Thriller

https://lithub.com/ian-fleming-explains-how-to-write-a-thriller/
2•frereubu•12m ago•0 comments

We built the fastest API for GLM-5.2

https://twitter.com/philipkiely/status/2069212319746506968
2•ljosifov•13m ago•0 comments

The curious history the invention of the CMD+K quick switcher

https://ux.stackexchange.com/questions/153299/how-did-cmd-k-come-to-be-the-standard-shortcut-for-...
2•birdculture•18m ago•0 comments

Digital Health Tools Are Reshaping Healthcare in the United States

https://nyulangone.org/news/digital-health-tools-are-reshaping-healthcare-united-states
2•giuliomagnifico•23m ago•0 comments

Kafka's Broken Promise: There Is No Goldilocks Log

https://www.opendata.dev/blog/announcing-opendata-log/
3•rmoff•25m ago•0 comments

Israel targeted Gaza children resulting in genocide, UN inquiry says

https://www.reuters.com/world/middle-east/israel-targeted-gaza-children-resulting-genocide-un-inq...
46•supercopter•26m ago•0 comments

We ran 1k queries through ChatGPT: 48 domains produced 22.5% of citations

https://growtika.com/blog/chatgpt-citation-economy
4•Growtika•27m ago•0 comments

N8n 2026 AI agent builder report

https://n8n.io/reports/2026-ai-agent-development-tools/
3•johannesishere•30m ago•0 comments

Synthetic Infrastructure Testing with Canary Checker and Flux

https://flanksource.com/blog/infrastructure-testing-with-canary-checker-and-flux
3•yashmehrotra•37m ago•1 comments

Crypto in 2026: Oh, This Is the Bad Place

https://www.stephendiehl.com/posts/bad_place_2026/
24•ibobev•38m ago•5 comments

Prism: An Impure Functional Language with Typed Effects

https://www.stephendiehl.com/posts/prism/
3•ibobev•39m ago•0 comments

Show HN: Shumai – open-source Frame.io alternative for creative work

https://github.com/shumaiOne/shumai
2•Yiling-J•40m ago•0 comments

What Is Software, and Will LLMs Replace It?

https://tomassetti.me/what-is-software-llms-interface-layer/
2•ftomassetti•40m ago•0 comments

Divergent Histories

https://buttondown.com/jaffray/archive/divergent-histories/
3•ibobev•40m ago•0 comments

Risk Assessment in under 5 minutes for NIS2

https://nisd2.eu/risikobewertung
1•cjhisey•45m ago•0 comments

You already have a Git server

https://gopeek-lovat.vercel.app/blog-you-already-have-a-git-server.html
5•sheelagay•51m ago•0 comments

Show HN: SaaS Pegasus – the original Django boilerplate, now MIT-licensed

https://github.com/saaspegasus/django-boilerplate
2•czue•56m ago•1 comments

Elon's Net Worth Today

https://whatselonworth.com/
3•Malfunction92•58m ago•1 comments

See How Sam Altman's Personal Investments Benefit from Ties to OpenAI

https://www.wsj.com/tech/ai/see-how-sam-altmans-personal-investments-benefit-from-ties-to-openai-...
2•thm•58m ago•0 comments

Show HN: DomainDash – uptime/SSL/domain checks for client sites

https://domaindash.io
2•edcs•59m ago•0 comments

Ask HN: Does in your workplace employee engagement / recognition is important?

5•mattsadowsky•59m ago•5 comments

Fil-C Linux/x86_64 version 0.680 Latest

https://github.com/pizlonator/fil-c/releases/tag/v0.680
4•sibellavia•1h ago•0 comments

Recursively Diff Packages

https://github.com/anthraxx/diffoscope
1•ankitg12•1h ago•0 comments

OCaml 5.5.0 Released

https://discuss.ocaml.org/t/ocaml-5-5-0-released/18265
2•dtoma•1h ago•0 comments