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 Sweeter Lesson

https://cacm.acm.org/opinion/the-sweeter-lesson/
1•visha1v•1m ago•0 comments

Why your Amazon order confirmation emails have become so unhelpful

https://www.theverge.com/ai-artificial-intelligence/977733/amazon-order-emails-google-gmail-ai-ag...
1•Macha•1m ago•0 comments

Intercity Bus Atlas

https://maps.dot.gov/BTS/IntercityBusAtlas/
1•jaredwiener•2m ago•0 comments

Ask HN: Why are we still building web UI's just for human consumption?

1•ud0•2m ago•0 comments

If LLMs can't write, I doubt it can lead us to AGI

https://www.thetrueengineer.com/p/i-tested-every-ai-model-the-same
2•adletbalzhanov•2m ago•0 comments

I used Claude to make an NES game that runs in an emulator

https://www.youtube.com/watch?v=RIEoIEcUosE
1•rib3ye•2m ago•0 comments

US Government is pushing to gain unprecedented access to your medical records

https://theconversation.com/us-government-is-pushing-to-gain-unprecedented-access-to-your-medical...
1•speckx•2m ago•0 comments

Show HN: See what an LLM learned, organised as a browsable tree

https://github.com/vishal-dehurdle/hypersae
1•visha1v•3m ago•0 comments

Retro phone trend reveals growing desire to disconnect, research finds

https://www.ecu.edu.au/newsroom/articles/research/retro-phone-trend-reveals-growing-desire-to-dis...
1•DeepLogin•3m ago•0 comments

Character and consequences in the age of intelligent machines

https://ctsmyth.substack.com/p/all-you-need-is-character
1•K0balt•4m ago•0 comments

Trump 2.0 has deleted or altered nearly 400 US datasets

https://www.theguardian.com/us-news/ng-interactive/2026/aug/18/trump-federal-data-deleted-altered
2•_djo_•4m ago•0 comments

China Removes Microsoft Windows at State Users Ahead of Plan

https://www.bloomberg.com/news/articles/2026-08-18/china-axing-microsoft-windows-from-state-agenc...
1•toomuchtodo•5m ago•1 comments

$1M hacker challenge for Vercel Sandbox

https://vercel.com/blog/one-million-dollar-hacker-challenge-for-vercel-sandbox
1•cletusigwe•7m ago•0 comments

Treasury Seeks Public Comment on Genius Act Proposed Rulemaking

https://home.treasury.gov/news/press-releases/sb0605
2•petethomas•7m ago•0 comments

PageSpeed Insights replays cached results, so I built an MCP that detects it

https://github.com/ConsidusOld/pagespeed-insights-mcp
1•Considus•11m ago•0 comments

Operationalizing agentic AI: The Day 0-2 blueprint for enterprise infrastructure

https://www.redhat.com/en/blog/operationalizing-agentic-ai-day-0-2-blueprint-enterprise-infrastru...
1•mooreds•12m ago•0 comments

30-year Treasury yield tops 5.33%, new 19-year high: inflation, spending worries

https://www.cnbc.com/2026/08/18/treasury-yields-.html
3•MilnerRoute•14m ago•0 comments

Why Don't We Version UIs?

3•gruensk•15m ago•2 comments

Diesel Margins Top $100 a Barrel to Reach Record High as Supply Crunch Grows

https://www.bloomberg.com/news/articles/2026-08-18/diesel-margins-top-100-a-barrel-to-reach-recor...
7•toomuchtodo•16m ago•1 comments

Hacker Koan

https://simple.wikipedia.org/wiki/Hacker_koan
1•gregsadetsky•18m ago•0 comments

The AI Slop Spiral

https://nolanfrausto.com/posts/ai-slop-spiral/
3•frausto•18m ago•1 comments

Eight hours of vintage department store Christmas music [video]

https://www.youtube.com/watch?v=nQKlEkKXBzQ
1•mooreds•19m ago•0 comments

Employees from lower class backgrounds face backlash when they negotiate

https://hbr.org/2026/08/research-employees-from-lower-class-backgrounds-negotiate-less-and-face-m...
1•underlipton•19m ago•0 comments

Recent grads say AI is making it harder to get a job. Economists aren't sure

https://text.npr.org/nx-s1-5910677
3•mooreds•22m ago•0 comments

the 404 test

https://www.oblo.mov/writing/the-404-test/
1•bahrtw•23m ago•1 comments

Show HN: Cronloop, run Claude Code or Codex on a schedule

https://cronloop.ai/
1•miketromba•24m ago•1 comments

Amazon Leo plans to connect mobile devices from space

https://www.aboutamazon.com/news/amazon-leo/amazon-leo-direct-to-device-satellite-service-explained
2•nateb2022•24m ago•0 comments

Self-Verification with DeepSeek V4 Flash Beats Claude Fable 5 on Terminal-Bench

https://github.com/llm-as-a-verifier/llm-as-a-verifier
2•yogthos•25m ago•0 comments

Trump Labels Map of Strait of Hormuz 'New U.S. Territory'

https://www.forbes.com/sites/zacharyfolk/2026/08/18/trump-labels-map-of-strait-of-hormuz-new-us-t...
2•bushwart•25m ago•0 comments

Sol Loves to Cheat

https://jumploops.com/blog/sol-loves-to-cheat/
1•jumploops•26m ago•0 comments