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/

Show HN: WhatsKept – Searchable,agent-queryable WhatsApp history from iOS backup

https://github.com/alkait/whatskept
1•tenthead•59s ago•0 comments

Maria Isabel Sánchez Vegara on Her 100th "Little People, Big Dreams" Book

https://www.amightygirl.com/blog?p=36753
1•zeristor•7m ago•0 comments

Show HN: F1l0 – Fitness Logger

https://f1l0.nickyreinert.de/
1•y42•7m ago•0 comments

Data Center Warfare: Defending AI Infrastructure

https://mwi.westpoint.edu/data-center-warfare-defending-the-key-terrain-of-ai-infrastructure/
1•Alien1Being•11m ago•0 comments

Show HN: I'm building a free TradingView alternative

https://www.aulico.com
1•rendernos•12m ago•0 comments

Banned

https://netwars.pelicancrossing.net/2026/06/19/banned/
2•ColinWright•19m ago•0 comments

Most indie devs build the wrong features. Here's one pattern that helps

https://featurebuddy.com/
2•dvanach•20m ago•1 comments

Nvidia Vera CPU Performance Compares to the Ampere Altra Max

https://www.phoronix.com/review/ampere-altra-nvidia-vera
1•rbanffy•21m ago•1 comments

EPEX: Matrix-free coefficient expansion for low-memory LWE experiments

https://zenodo.org/records/20743190
1•TomIRN•25m ago•0 comments

QuEra's Libra Fault-Tolerant Quantum System Heading to Amazon Braket Service

https://www.nextplatform.com/compute/2026/06/16/queras-libra-fault-tolerant-quantum-system-headin...
1•rbanffy•25m ago•0 comments

Fli -a tiny (18KB) easy to read file listing tool. Rust no_std and Libc

2•tracyspacy•26m ago•0 comments

Show HN: SciCollab – A platform where research happens, together

https://www.scicollab.org/
1•pixelatedRudy•28m ago•0 comments

Maptap.gg – Daily Geography Game

https://maptap.gg/
1•Gathering6678•29m ago•0 comments

Microsoft discovers new lightweight backdoor that steals cryptocurrency

https://arstechnica.com/security/2026/06/microsoft-spots-new-self-propagating-malware-for-stealin...
1•rbanffy•30m ago•0 comments

Nigeria's Babylon System [video]

https://www.youtube.com/watch?v=5vlmEuIPRIs
1•daesorin•30m ago•0 comments

Taste and judgement are lies we tell ourselves

https://technotes.substack.com/p/taste-and-judgement-are-lies-we-tell
3•mkagenius•34m ago•0 comments

"6-paper alternative to dark matter, tested across galaxy to cosmic scales"

2•SPruynIDR•36m ago•0 comments

Trump administration to phase out HIV funding

https://www.politico.com/news/2026/06/18/pepfar-south-africa-white-afrikaners-hiv-aids-00968479
5•Alien1Being•42m ago•0 comments

'Politically naive': The fight behind Anthropic's export controls

https://www.politico.com/news/2026/06/19/he-has-to-find-a-way-to-be-friends-the-political-fight-b...
3•Alien1Being•43m ago•0 comments

Getting Back to Basics by Abusing AI

https://blog.unitedheroes.net/5752
2•simonebrunozzi•46m ago•0 comments

Solved and Unsolved: The Status of Hilbert's 23 Problems in Mathematics

https://www.simonsfoundation.org/2026/06/18/solved-unsolved-and-unsolvable-the-status-of-hilberts...
1•nill0•51m ago•1 comments

Show HN: Aastro – Extendable API Gateway in Go

https://starwalkn.github.io/aastro-docs/
2•starwalkn•52m ago•0 comments

An empirical fit to 171 galaxy rotation curves with zero free parameters

https://github.com/SPruynIDR/Galaxy-Rotation-Curves-SPARC-Validation-Test
4•SPruynIDR•54m ago•0 comments

Stop Naming Your Variables "Flag": The Art of Boolean Prefixes

https://thatamazingprogrammer.com/posts/stop-naming-your-variables-flag-the-art-of-boolean-prefixes/
1•theanonymousone•54m ago•0 comments

James Burrows, legendary director of Cheers and Friends, dies aged 85

https://www.bbc.co.uk/news/articles/ce8k07x523eo
2•mellosouls•59m ago•0 comments

Stop Saying Half of 2026 US Datacenter Capacity Is Canceled

https://newsletter.semianalysis.com/p/stop-saying-half-of-2026-us-datacenter
1•alecco•1h ago•0 comments

It's Time to Clean Up Human Slop

https://thenewstack.io/ai-code-review-self-review/
2•fatliverfreddy•1h ago•0 comments

Google, Microsoft offer specs to help you prove your AI is behaving nicely

https://www.cio.com/article/4187280/google-microsoft-offer-specs-to-help-you-prove-your-ai-is-beh...
2•mindcrime•1h ago•0 comments

ClawTown: Autonomous agents bid on tasks and settle out of escrow

https://clawtownai.com/
1•Emadiali83•1h ago•0 comments

Logslim – compact test/build output before your AI agent reads it

https://github.com/P156HAM/logslim
1•P156HAM•1h ago•0 comments