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/

Starmer to announce social media curfew and chatbot ban for teens

https://www.thetimes.com/uk/politics/article/social-media-ban-keir-starmer-qcmskxc5z
1•poisonfountain•34s ago•0 comments

Perlisisms

https://www.cs.yale.edu/homes/perlis-alan/quotes.html
1•tosh•57s ago•0 comments

Cloud-based LLM gold rush is ending

https://automato.substack.com/p/apple-wwdc-and-the-fable-5-embargo
1•andrewstetsenko•1m ago•0 comments

Podcast: Book Interview: Signals and Levers • Elisabeth Hendrickson, Joel Tosi [video]

https://www.youtube.com/watch?v=8tNtZMm3Hyc&list=PLEx5khR4g7PJbSLmADahf0LOpTLifiCra
1•chhum•3m ago•0 comments

Moats Need Models

https://twitter.com/sahar__zadeh/status/2064759511253176398
1•gmays•4m ago•0 comments

I built InstaTakker – a portable desktop Instagram workflow manager for Windows

https://github.com/issaghostlife/instatakker-app
1•issaghostlife•5m ago•1 comments

UK set to announce social media ban for under-16s

https://www.manchestereveningnews.co.uk/news/uk-news/uk-set-announce-social-media-34119132
6•beejiu•6m ago•0 comments

Ask HN: Is Coding Solved?

1•champagnepapi•7m ago•1 comments

Signal says UK plan to scan devices for nude images 'endangers us all'

https://www.theregister.com/security/2026/06/09/signal-uks-child-nude-block-threat-wont-protect-c...
5•Bender•7m ago•0 comments

Show HN: Öcha – A minimalist, Kindle-style RSS and newsletter reader

https://readocha.com/
2•pavn•8m ago•0 comments

US Army picks out Vampire to fill a gap in its layered drone defenses

https://www.theregister.com/offbeat/2026/06/14/us-army-picks-out-vampire-to-fill-a-gap-in-its-lay...
1•Bender•8m ago•0 comments

Dangerous hormone-disrupting chemicals found in US breast milk samples

https://www.theguardian.com/us-news/2026/jun/14/breast-milk-research-chemicals
3•andsoitis•10m ago•0 comments

No, everyone is not using AI for everything

https://gabrielweinberg.com/p/people-are-consuming-ai-like-they
2•yegg•13m ago•0 comments

Cloud-9 AWS spot instance optimizer with ML price prediction and FinOps advisors

https://cloud-9-optimizer.streamlit.app
1•Medhane•14m ago•0 comments

A 'cold blob' in the Atlantic could be a sign of AMOC shutdown – CNN

https://www.cnn.com/2026/06/12/climate/cold-blob-atlantic-amoc-ocean-circulation
12•tambourine_man•17m ago•0 comments

The Typestate Pattern in Rust

https://cliffle.com/blog/rust-typestate/
1•Brajeshwar•17m ago•0 comments

Rio de Janeiro's city government model Rio3.5 beats Qwen3.7 in recent benchmarks

https://twitter.com/zenmagnets/status/2065796012820848699
9•lucasfcosta•19m ago•2 comments

Show HN: Dual YOLOv8n UAV Detection on RK3588S at 42 FPS Using NPU

https://github.com/alebal123bal/khadas_yolov8n_multithread
1•alebal123bal•20m ago•0 comments

EU Commission looking at practical consequences of Anthropic decision

https://www.reuters.com/legal/litigation/eu-commission-looking-practical-consequences-anthropic-d...
5•tartoran•24m ago•0 comments

The most secure AI interview copilot currently on the market

https://aceloop.ai/security-model
1•rosadoft•25m ago•0 comments

You need to stop using Windows 11 [video][14 mins]

https://www.youtube.com/watch?v=S6Iq6HubIAw
2•Bender•26m ago•0 comments

Extinction-Level Capitalism

https://matthewbutterick.com/extinction-level-capitalism.html
4•laurex•27m ago•1 comments

Music generation using Algebra, presented as web MIDI shop

https://monictheory.com
1•midi_finder•29m ago•1 comments

Xiaomi portable coffee maker brew coffee from capsule or ground coffee on the go

https://citymagazine.si/en/xiaomi-mijia-portable-coffee-machine-portable-espresso-machine-that-pr...
2•teleforce•30m ago•2 comments

Cancer variants in Alzheimer's disease cells drive inflammatory states

https://www.cell.com/cell/fulltext/S0092-8674(26)00341-7?_returnURL=https%3A%2F%2Flinkinghub.else...
1•bookofjoe•32m ago•0 comments

She waited decades for Scotland to make the World Cup

https://text.npr.org/nx-s1-5842854
1•mooreds•32m ago•0 comments

Is It ADHD or BVD? Binocular Vision Dysfunction Symptoms and Test

https://www.cookvisiontherapy.com/adhd-and-vision-how-eye-problems-affect-attention/
1•adm4•33m ago•0 comments

I built a bookkeeping app for UK sole traders as a new developer using AI

1•JamesQP•33m ago•0 comments

Introduction to the IETF

https://www.ietf.org/about/introduction/
2•mooreds•34m ago•0 comments

Pink Cosmo berries a hit in their trial season (2023)

https://fruitgrowersnews.com/article/pink-cosmo-berries-a-hit-in-their-trial-season/
1•mooreds•35m ago•0 comments