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/

Starlink v5 flat vs. v4 flat (standard) dimension and weight comparison

https://starlink.com/bl/support/article/5465736f-fa8d-3ac1-dd3a-7a259d12fa8d
1•walrus01•4m ago•0 comments

Show HN: GlossaryPage – Turn customer questions into knowledge pages

https://glossarypage.com/
1•morioka•7m ago•0 comments

Elon Musk Melts Down over Perfectly Normal Questions in Wild New Interview

https://gizmodo.com/elon-musk-economist-interview-2000790016
1•makerdiety•11m ago•0 comments

Seeing Is Not Believing: Realistic AI Videos Disrupt Confidence in Real Videos

https://www.media.mit.edu/publications/seeing-is-not-believing/
1•abhas9•12m ago•0 comments

just surf

https://ben.page/surf
2•jer0me•12m ago•0 comments

Gigatoken-rb – A Ruby port of gigatoken that's 1.6x faster

https://github.com/jetpks/gigatoken-rb
1•jetpks•19m ago•0 comments

Show HN: Bohay – Mission control for your AI coding agents

https://bohay.dev/
1•ariestiyansyah•20m ago•0 comments

MLFlow Alternative Written in Go

https://github.com/zeddo123/mlsolid
2•zeddo123•24m ago•0 comments

In the 1950s, a Soviet engineer proposed damming the Bering Strait

https://economictimes.indiatimes.com/us/news/in-the-1950s-a-soviet-engineer-proposed-damming-the-...
1•iancmceachern•25m ago•0 comments

Ask HN: Is HN's duplicate url detection broken?

3•khaledh•29m ago•1 comments

Show HN: RefurbAlert – Never miss a refurbished deal again

https://refurbalert.com/us
1•RioRaby•29m ago•0 comments

Tesla Sinks on Investor Angst over AI Spending, Profit Drop

https://news.bloomberglaw.com/texas-brief/tesla-profit-falls-well-short-of-expectations-as-costs-...
2•1vuio0pswjnm7•32m ago•0 comments

U of T mathematician Jacob Tsimerman awarded prestigious Fields Medal

https://www.utoronto.ca/news/nobel-prize-mathematics-u-t-mathematician-jacob-tsimerman-awarded-pr...
3•crescit_eundo•37m ago•1 comments

Show HN: I built a local Node.js conduit for the BorgIOS network

https://github.com/bitmonky/borgHUI
2•BorgIOS•39m ago•0 comments

Don't Trust the Label: License Laundering in AI Supply Chains

https://arxiv.org/abs/2607.20300
2•sbulaev•44m ago•0 comments

Uber's New Litigation Funding Terms Would Hinder Accountability

https://news.bloomberglaw.com/legal-exchange-insights-and-commentary/ubers-new-litigation-funding...
1•1vuio0pswjnm7•45m ago•0 comments

AI Was Supposed to Lift Everybody., The Price Tag Says Otherwise

https://AllyAgentOperations.com/blog/ai-pricing-access-everyone/
2•marvinlewis•45m ago•0 comments

Show HN: Tuziyo – Compare multiple AI image models in one studio

https://tuziyo.com/
1•ledboot•47m ago•0 comments

Reddit Defends Authority to Sue Perplexity over Data Scraping

https://news.bloomberglaw.com/litigation/reddit-defends-authority-to-sue-perplexity-over-data-scr...
2•1vuio0pswjnm7•48m ago•0 comments

AI tool may help doctors, but sample size too small

https://text.npr.org/g-s1-134929
1•williadc•48m ago•1 comments

Show HN: PDFly – 56 free PDF tools that run in the browser

https://pdfly.uk/
2•pagalannu01•49m ago•0 comments

Chord Version 1 – A new IF modeling language for parser web games

https://sharpee.plover.net/chord-version-1/
1•ChicagoDave•52m ago•0 comments

The labour arbitrage theory of dev tool popularity

https://www.baldurbjarnason.com/2024/react-electron-llms-labour-arbitrage/
1•Teckla•54m ago•0 comments

Show HN: Free Email Verification Tool – no signup required

https://probe.uspeedo.online/
1•starryrbs•56m ago•0 comments

AI #178: A Fire Alarm for General Intelligence

https://thezvi.substack.com/p/ai-178-a-fire-alarm-for-general-intelligence
1•paulpauper•57m ago•0 comments

Should robots be considered as slaves?

https://www.optimallyirrational.com/p/should-robots-be-considered-as-slaves
1•paulpauper•58m ago•1 comments

Show HN: SMTP-probe – an open-source email deliverability diagnostic tool

https://github.com/monto-fe/smtp-probe
1•starryrbs•59m ago•0 comments

OpenBao Features – Declarative Configuration

https://openbao.org/blog/features-declarative-configuration/
1•cipherboy•1h ago•0 comments

Show HN: I poked at the golden ratio in SQL and solved an open math problem

https://blob.byteterrace.com/public/bds-theorem.html
1•kittoes•1h ago•0 comments

Show HN: Deep Skill Finder – Find agent skills using real execution benchmarks

https://www.meyo.life/skill
2•hannahLiang•1h ago•0 comments