frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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•11mo ago

Comments

bastawhiz•11mo ago
Is this a problem that people actually have?
xeromal•11mo ago
Fun side project man!
primitivesuave•11mo 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•11mo 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•11mo ago
You can still control it by adding "//no-await". In fact, the "//no-await" makes me feel more clear.
nextweek2•11mo 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•11mo ago
It should be noted that there is already a lint rule for this: https://typescript-eslint.io/rules/no-floating-promises/

Show HN: I built an Open-source Dropbox/Google Drive BOYB(Bring your own bucket)

https://github.com/zmeyer44/Locker
1•Zm44•40s ago•0 comments

Talk about PPU (Parallel Processing Unit) increasing CPU speeds exponentially

https://www.youtube.com/watch?v=ZiQxxzCHLvo
1•openhw•3m ago•0 comments

Industrial Policy for the Intelligence Age

https://openai.com/index/industrial-policy-for-the-intelligence-age/
1•salkahfi•5m ago•0 comments

Avoid Concatenation in Log Statements

https://blog.bonnieeisenman.com/blog/avoid-concatenation-in-log-statements/
1•luu•6m ago•0 comments

Show HN: Beat Darwin

1•ecosystemj•7m ago•0 comments

Show HN: I built lightweight LLM tracing tool with CLI

https://github.com/SKE-Labs/lightrace
1•skele•7m ago•1 comments

GlueClaw: Use Claude subscription in OpenClaw again

https://github.com/zeulewan/glueclaw
1•zeulewan•8m ago•1 comments

Show HN: Browser-based EXIF remover – no upload, runs offline via WASM

https://picshift.app/metadata-remover/
2•pod4g•12m ago•0 comments

Drug safety intelligence API – 1M+ FDA adverse events in one call

https://pharma-signal.com
1•Niteowlpt•14m ago•0 comments

Show HN: I just built a MCP Server that connects Claude to all your wearables

https://pacetraining.co/
1•anton_salcher•15m ago•2 comments

Tips and tricks to avoid cloning in Rust

https://antoine.vandecreme.net/blog/avoiding-clone/
1•avandecreme•18m ago•0 comments

Ask HN: How do you escape golden handcuffs at FAANG?

2•oumua_don17•19m ago•3 comments

RISC-V Linux BusyBox Single Board Notebook

https://tomlarkworthy.github.io/lopebooks/notebooks/@tomlarkworthy_linux-sbc.html
1•tlarkworthy•23m ago•0 comments

Career-Ops: How I Built My Own AI Job Search Tool

https://santifer.io/career-ops-system
1•futurecat•24m ago•0 comments

Making Gamedev Tooling For Windows 3.1 in Turbo C++ [video]

https://www.youtube.com/watch?v=-7mc-D5V4L8
1•xyproto•26m ago•0 comments

Nanoscale Vacuum-Channel Transistor

https://en.wikipedia.org/wiki/Nanoscale_vacuum-channel_transistor
1•akshatjiwan•31m ago•0 comments

Texas Republican Called Out for Sharing AI Rendering of Rescued Soldier

https://www.mediaite.com/media/news/texas-republican-called-out-for-sharing-ai-rendering-of-rescu...
1•01-_-•31m ago•0 comments

Anomaly detection with nothing but Welford's algorithm and a KV store

https://uriv.me/blog/anomaly-detection-with-welford-and-kv
3•birdculture•42m ago•0 comments

All GANs No Brakes

https://mayberay.bearblog.dev/all-gans-no-brakes/
1•mugamuga•43m ago•0 comments

Paramera modified carbon fiber hood

https://www.porsche-km.com/productinfo/192708.html
1•edl8888•48m ago•0 comments

NIMBY Rails

https://store.steampowered.com/app/1134710/NIMBY_Rails/
10•altilunium•49m ago•0 comments

Show HN: Reverse-engineered the FPGA bitstream using Claude Code

https://github.com/14sea/Cyclone_CRAM_Mapper
4•14sea•49m ago•1 comments

Hell Is a World in Which Everybody Writes Like Axios (2022)

https://newrepublic.com/article/167857/axios-smart-brevity-book-hell-world
2•Tomte•50m ago•1 comments

Euro-Office – Your sovereign office

https://github.com/Euro-Office
40•XzetaU8•58m ago•10 comments

College instructor turns to typewriters to curb AI use, teach life lessons

https://apnews.com/article/typewriter-ai-cheating-chatgpt-cornell-ce10e1ca0f10c96f79b7d988bb56448b
2•1vuio0pswjnm7•59m ago•2 comments

Disposable Tools Manifesto

https://blog.vtemian.com/post/disposable-tools-manifesto/
1•vtemian•59m ago•0 comments

AI Damaged a Friendship

https://www.bartmol.io/how-ai-damaged-a-friendship/
2•Maulwurf•1h ago•0 comments

Vincelwt/gloomberb: Finance terminal, in your terminal

https://github.com/vincelwt/gloomberb
1•rcarmo•1h ago•0 comments

Java: The Foreign Function and Memory API

https://dev.java/learn/ffm/
2•tosh•1h ago•0 comments

Show HN: I developed a node editor framework using gpui

https://github.com/tu6ge/ferrum-flow
3•tu6ge•1h ago•4 comments