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/

"This American Life" Reveals Coca-Cola's Secret Recipe (Ingredient List) (2011)

https://www.cbsnews.com/news/this-american-life-reveals-coca-colas-secret-recipe-full-ingredient-...
1•Bluestein•55s ago•0 comments

Researchers identify the main factors in pornography use among adolescents

https://diaridigital.urv.cat/en/researchers-identify-the-main-factors-in-pornography-use-among-ad...
1•giuliomagnifico•1m ago•0 comments

An open, structured taxonomy of what children learn across the primary years

https://github.com/withmarbleapp/os-taxonomy
1•jinqueeny•4m ago•0 comments

The Years We Can't Hire Back

https://yusufaytas.com/the-years-we-cannot-hire-back
6•yusufaytas•8m ago•0 comments

Show HN: Clara – a decision model that returns a probability for every answer

https://api.saanora.com/docs
1•AKSaathwik•12m ago•0 comments

Samsung running a TensorFlow lite model on 960x540 image to track you

https://twitter.com/mike64_t/status/2114150399406202896
2•mashally•14m ago•0 comments

Abstraction Fatigue

https://shubhamjain.co/2026/10/15/abstraction-fatigue/
1•shubhamjain•15m ago•0 comments

Jev-style decisions for IMAGES: Fovea-4B, open 4B, one forward pass

https://huggingface.co/Sivasuthan/fovea-4b
1•sivasuthansukum•17m ago•0 comments

CVE-2026-107891: musl Libc Integer Overflow in regcomp Leading to Heap Issues

https://www.openwall.com/lists/oss-security/2026/10/21/18
1•birdculture•20m ago•0 comments

The Commentapocalypse Is Nigher

https://lars.ingebrigtsen.no/2026/10/24/the-commentapocalypse-is-nigher/
2•theshrike79•25m ago•0 comments

Djedi Project

https://en.wikipedia.org/wiki/Djedi_Project
1•stein1946•25m ago•0 comments

Show HN: Philosophic Moon in Your Terminal

https://github.com/SorBalda/philosophic-moon
1•sorbalda•25m ago•0 comments

Rivian buys startup to turn 400,000 daily clips into 3D sims

https://electrek.co/2026/10/23/rivian-third-dimension-acquisition-self-driving-simulation/
1•cisc•29m ago•0 comments

Show HN: Where does my tax go? A UK tax receipt calculator (2026/27)

https://wheredoesmytaxgo.co.uk/
1•heyiamluke•33m ago•0 comments

Show HN: Echoboard where AI agents do science and humans only watch

https://jevontane.com/echoboard/
1•jevontane•38m ago•0 comments

The design skill that ends AI slop

https://github.com/Nutlope/hallmark
3•capex•38m ago•0 comments

The Essence of Writing

https://app.fluxlinks.com/ezra/logical-compilation-collapsing-linear-prose-into-explicit-proposit...
1•ezrasu•39m ago•0 comments

Be Aware of What's in Your Logs

https://fireborn.mataroa.blog/blog/be-aware-of-whats-in-your-logs/
2•joshcsimmons•39m ago•0 comments

Trafficity – a city builder focused on traffic – gameplay trailer [video]

https://www.youtube.com/watch?v=fUkBn6H-d-A
1•cyrc•41m ago•0 comments

Reseter.css 3.0 brings a major overhaul to the lightweight CSS reset library

https://ikrishg.github.io/reseter.css/
1•javatuts•47m ago•0 comments

Musk says SpaceX restricted Ukraine's Starlink connection as service restored

https://www.bbc.co.uk/news/articles/cvx28ljp8n4xo
2•iamflimflam1•54m ago•0 comments

Difftastic, a Structural Diff

https://difftastic.wilfred.me.uk/
1•Tomte•55m ago•0 comments

France asked ISPs to prepare temporary DNS blocks for major social platforms

https://www.blast-info.fr/articles/2026/information-exclusive-blast-le-premier-ministre-a-prepare...
38•noplay•59m ago•18 comments

Econvitals

https://econvitals.org/
1•Ihmahr•1h ago•0 comments

Ask HN: Are tab completion models dead?

3•sandruso•1h ago•1 comments

Nikon photography contest winner loses title after scientists spot signs of AI

https://www.techspot.com/news/114171-nikon-photography-contest-winner-loses-title-after-scientist...
4•thunderbong•1h ago•0 comments

Active Sonar: Mitigating Hardware CV Aimbots via Kinematics [RFC]

https://github.com/LeoLordin/Active-Sonar-AntiCheat
2•LeoLordin•1h ago•0 comments

Brutalist Architecture

https://en.wikipedia.org/wiki/Brutalist_architecture
1•tosh•1h ago•0 comments

An artist's take on AI in math

https://3blue1brown.substack.com/p/an-artists-take-on-ai-in-math
2•Eridanus2•1h ago•0 comments

The AI and Steve Strogatz

https://cultureandcompass.substack.com/p/the-ai-and-steve-strogatz
2•artninja1988•1h ago•0 comments