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/

What the labs aren't telling us

https://www.amapel.me/what-the-labs-arent-telling-us
1•pellicceama•33s ago•0 comments

Show HN: TOKO – A lightweight desktop app to cook prompts first

https://donovan-ratefison.github.io/toko/
1•Donovan-R•2m ago•0 comments

How fast can *you* break an elliptic curve?

https://ecdlp.live/
3•grittygrease•3m ago•0 comments

The Rocky Mountains Are About to Move [video]

https://www.youtube.com/watch?v=93X001VzIV4
1•Bender•4m ago•0 comments

Cryptography behind the top cryptocurrencies (2021)

https://ethanfast.com/top-crypto.html
1•spzx•6m ago•0 comments

JEPA world models could predict physics all along. Now they can plan with it

https://haddyalchaer.com/playwm
1•halcdev•6m ago•0 comments

Show HN: Gitsquashed – your GitHub year as a card (open source)

https://gitsquashed.com/
1•7eoinfr•7m ago•0 comments

The Future of Older Worker

https://oldforhire.com/
1•pepebg•8m ago•0 comments

Show HN: ButterSim – RTL simulation accelerator built with Gemini

https://github.com/manili/ButterSim
1•manili•8m ago•0 comments

La Monte Young, US minimalist composer and conceptual artist, dies aged 91

https://www.theguardian.com/music/2026/dec/06/la-monte-young-us-minimalist-composer-conceptual-ar...
2•knowhy•9m ago•0 comments

The NSA's scramble to slow down AI

https://www.axios.com/2026/12/06/ai-encryption-nsa-slow-down-models
2•artninja1988•9m ago•2 comments

Cached input prices differ by 26x among 8 EU inference providers

https://ttft.eu/blog/cached-input-price
1•g58892881•10m ago•1 comments

Making guns in Blender with LLM agents

https://tomaytotomato.com/making-guns-in-blender/
1•tomaytotomato•10m ago•0 comments

The NSA's post-quantum push: what the clouds changed and what's left for you

https://twitter.com/brightsparc/status/2129630194667491632
1•brightsparc•11m ago•0 comments

Meta says Australia social media ban hit 1.5M teen accounts in first year

https://www.reuters.com/legal/litigation/meta-says-australia-social-media-ban-hit-15-million-teen...
3•gwu78•16m ago•0 comments

The Apothecary

https://biographic.com/the-hidden-apothecary/
2•speckx•21m ago•0 comments

DO-178B: Software Considerations in Airborne Systems and Equipment Certification

https://en.wikipedia.org/wiki/DO-178B
3•gjvc•23m ago•0 comments

Capitulation Address: Realise Software for Social Need

https://marewolf.me/posts/draupnir/26/realise-software-for-social-need.html
2•matanyall•24m ago•0 comments

Show HN: Opsh – A terminal AI assistant for Linux servers over SSH

https://opsh.dev/
2•6bR35•27m ago•0 comments

Show HN: Days Since Calculator

https://adaysince.com/
2•artiomartiom•30m ago•0 comments

Show HN: HimitsuObfuscator – Whitelist LLVM C++ Obfuscator Against AI/Reversers

https://github.com/HimitsuShell/HimitsuObfuscator
3•mushstory•33m ago•0 comments

Proportional Personal Digital Security

https://philippdubach.com/posts/proportional-personal-security/
3•toomuchtodo•34m ago•0 comments

Show HN: Hydrology and Biome Simulator

https://aperocky.com/projects/hydrosim/
1•Aperocky•36m ago•0 comments

DoorDash Suffers from AI-Powered Cyber Breach

https://help.doordash.com/en-us/dashers/article/dx-november-2026-security-incident
2•hdjY28•37m ago•1 comments

Mid-conversation system instructions in the Gemini API

https://blog.google/innovation-and-ai/technology/developers-tools/gemini-api-mid-conversation-upd...
2•gmays•39m ago•0 comments

Show HN: cpmulator: A CP/M emulator which now compiles to WASM

https://github.com/skx/cpmulator/releases
2•stevekemp•39m ago•1 comments

K8s on FoundationDB

https://github.com/melgenek/f8n
3•josh-wrale•39m ago•0 comments

US stock market 23/5 trading begins tonight

https://www.theguardian.com/business/2026/dec/06/wall-street-23-hour-trading-begins
8•sahilsingla47•40m ago•2 comments

US home prices: record highs in dollars, but not after inflation

https://datascienceplus.com/inflation-adjusted-home-prices-in-r-record-highs-in-dollars-but-how-o...
2•kkk4seis•40m ago•0 comments

You need to unlock your iPhone first

https://twitter.com/Galkon/status/2129444430549844342
2•malshe•41m ago•2 comments