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 Hexamodal Distribution of Tech Salaries in Spain

https://www.getmanfred.com/en/blog/hexamodal-distribution-of-tech-salaries-spain
1•ultral•1m ago•0 comments

Gemma 4 26B on a 24 GB Mac Mini M4: from 66% CPU to 100% GPU

https://mac-mini-m4-doc.masterfabric.co/
1•gurkandev•1m ago•0 comments

Being Lazy in C++

https://cpp-rendering.io/being-lazy-in-c/
1•dalvrosa•1m ago•0 comments

Show HN: I Built a CLI for Proton Mail, Drive, Calendar, Pass and Contacts

https://github.com/roman-16/proton-cli
1•Wavum•9m ago•0 comments

Ask HN: MacBook Pro (Max) equivalent Linux laptop?

1•apples_oranges•10m ago•0 comments

Show HN: AgentJIT – Compile dynamic LLM agent workflows into 0.1ms Python

https://github.com/eminsk/agentjit
1•eminskinfo•12m ago•0 comments

Show HN: InterviewsRadar – Sell or find interview experiences

https://interviewsradar.com
1•Lewis-Lin•14m ago•0 comments

Show HN: I built ThreadShelf to reuse hard-to-export AI chats like OpenRouter

https://github.com/ChrystianSchutz/ThreadShelf
1•chrystianpl•14m ago•0 comments

SQLite natively supports JSON as output format

https://mastodon.social/@chr1stian/117263681445001754
1•21sys•16m ago•0 comments

Free domain monitoring through echelongraoh.io

1•akd29121988•17m ago•0 comments

Why AI Benchmarks Are Total BS

https://www.pcmag.com/opinions/why-ai-benchmarks-are-total-bs-and-how-openai-and-anthropic-use-th...
2•mastry•19m ago•0 comments

Solod 0.4: Better C interop

https://antonz.org/solod-0.4/
1•ibobev•20m ago•0 comments

"Deciphering Visceral Instincts" by Diego Bohórquez [video]

https://www.youtube.com/watch?v=YXXYM3Z4fV0
1•binyu•20m ago•0 comments

Principal Component Analysis

https://brashandplucky.com/2023/09/07/principal-component-analysis.html
1•ibobev•21m ago•0 comments

Matt Mullenweg reportedly returns as Automattic CEO 2 days after getting booted

https://www.theverge.com/tech/994087/matt-mullenweg-automattic-ceo-return
6•bookofjoe•21m ago•3 comments

Why is the x86 undefined instruction called ud2? Why 2?

https://devblogs.microsoft.com/oldnewthing/20260910-00/?p=112689
1•ibobev•21m ago•0 comments

Texas puts a brake on its data centre boom

https://www.ft.com/content/3204d65e-ae34-4ab3-a73f-a55d354f40ab
1•JumpCrisscross•25m ago•0 comments

The Kirby Krackle

https://newschematic.org/blog/kirby-krackle/
2•chrisbodhi•25m ago•0 comments

Generate-Ilograph: A skill to create auditable sequence diagrams of a codebase

https://github.com/ilograph/skills
1•billyp-rva•26m ago•0 comments

Problem Archives – Project Euler

https://projecteuler.net/archives
2•vismit2000•27m ago•0 comments

Dotnet-ef-scripts – A collection of handy scripts for .NET Entity Framework

https://github.com/brysonbw/dotnet-ef-scripts
1•Brysonbw•28m ago•0 comments

Panic builds over bankrupt Spirit's looming data sale to Google

https://arstechnica.com/tech-policy/2026/09/panic-builds-over-bankrupt-spirits-looming-data-sale-...
2•bookofjoe•29m ago•0 comments

LLM Atlas: community intelligence board

https://llms.sciencebo.uk/top
1•alikatyc•29m ago•1 comments

Void Linux Maintainer Orphans 100 Packages over AI Policy Dispute

https://www.phoronix.com/news/Void-Linux-AI-Policy-Orphan
3•choult•32m ago•0 comments

Ask HN: On the Contest of Meat and Machine

2•joebig•32m ago•0 comments

Work

https://ghq.com
1•GeorgePMC•33m ago•0 comments

Post on HN, get flooded with AI sales pitches

https://textlog.cc/post/1055
2•stagas•35m ago•0 comments

DietPi released a new version v10.7

1•stephanstsdietp•35m ago•0 comments

I Asked 100 Agents to Hack Me

https://blog.sshh.io/p/i-asked-100-agents-to-hack-me
2•mjs•36m ago•0 comments

The SICP Challenge

https://billthelizard.blogspot.com/2009/10/sicp-challenge.html
2•AlexeyBrin•39m ago•0 comments