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/

'Cruise for life' ship seized in Singapore

https://www.bbc.com/news/articles/cqr7y7myer53o
1•bookofjoe•47s ago•1 comments

Quark: A 9B locally runnable reasoning model tuned for physics and math

https://huggingface.co/FirstPrinciplesLabs/quark
1•otalp•4m ago•0 comments

Nintendo Takes Down Emulators and Firmware in Massive GitHub DMCA Sweep

https://www.ign.com/articles/nintendo-takes-down-switch-emulators-and-mod-chip-firmware-in-massiv...
2•CharlesW•5m ago•0 comments

The History of the History of Algorithms: In Defense of Improper Periodization

https://www.jhiblog.org/2026/11/09/algorithms-improper-periodization/
1•fortran77•6m ago•0 comments

From Rent to Root: Introducing NvRoot (CVE-2026-47591)

https://stealthium.io/blog/nvroot
1•sshah03•6m ago•0 comments

Discontinuation of Google and Apple Accounts Linking to Nintendo Accounts

https://www.nintendo.com/au/support/articles/discontinuation-of-google-and-apple-accounts-linking...
1•layer8•6m ago•0 comments

The ENIAC in Context: 80 Years of Computing History (VCF Midwest Talk) [video]

https://www.youtube.com/watch?v=4wm780EI6f4
1•fortran77•6m ago•0 comments

Guidelines on attempts to manipulate the ocean put spotlight on geoengineering

https://www.theguardian.com/environment/2026/nov/12/canada-climate-geoengineering-marine-carbon-c...
1•PaulHoule•7m ago•0 comments

The DO's and DOn'ts of Post-Quantum DNSSEC

https://ispcol.potaroo.net/2026-11/dodnssec.html
1•caminanteblanco•7m ago•0 comments

Trump says Apple's Tim Cook should take over Nvidia

https://www.washingtonpost.com/technology/2026/11/12/trump-says-apples-tim-cook-should-take-over-...
1•glass1122•9m ago•0 comments

"Omarchy ... v3 –> v4 migration just deleted my network setup without warning"

https://twitter.com/tomhacks/status/2120456892665450846
1•eatonphil•10m ago•1 comments

OpenAI and Georgia county leaders hit with Mafia-style RICO racketeering lawsuit

https://www.tomshardware.com/tech-industry/data-centers/georgia-politicians-openai-slapped-with-r...
1•myleshenderson•11m ago•0 comments

Show HN: DBZ Creator's studio demolished today. I rebuilt it in 3D

https://bird.jacomakes.com
1•jacomakes•12m ago•0 comments

R2: The Engine of Engines

https://www.redpanda.com/blog/r2-the-engine-of-engines
1•PeterCorless•12m ago•0 comments

2FA Removed from Humble Bundle

https://www.reddit.com/r/humblebundles/comments/1xtj3nj/2fa_removed_from_humble_bundle/
1•pavel_lishin•13m ago•2 comments

Show HN: ReadyStack.dev – Bit-for-bit reproducible OSS containers

1•readystack•14m ago•0 comments

Show HN: Jigsaw – modern multiplayer jigsaw puzzles in the browser

https://jigsaw.marnil.dev
1•mebn•15m ago•0 comments

Algorithm in the Consulting Room

https://medium.com/@smoking2man/algorithm-in-the-consulting-room-on-the-architectural-mismatch-be...
1•Aldus551•16m ago•0 comments

The Conflict Between Generative Art and AI

https://lostpixels.io/writings/the-ai-and-generative-art-conflict
1•cosiiine•17m ago•0 comments

Proschi – architecture diagrams as code that simulate load and failures

https://proschi.app/
1•gvart•17m ago•0 comments

Show HN: Dino Battle, a math adventure game my 7-year-old dreamed up

https://dinosaurs.flatown.com/
1•jflatow•18m ago•0 comments

Ontario SMR Nuclear Projects Face Delays and Overruns

https://www.nucnet.org/news/opg-begins-comprehensive-assessment-as-canada-smr-project-faces-delay...
1•pfdietz•18m ago•0 comments

Umo – Your AI CMO

https://www.umo.ai/
1•sahil_chaudhary•19m ago•0 comments

MIT engineers create a system for building shape-changing smart devices

https://news.mit.edu/2026/mit-engineers-create-system-for-building-shape-changing-smart-devices-0827
1•gmays•21m ago•0 comments

A friend recently prompted his own Linux ABI-compatible OS

https://twitter.com/patrickc/status/2120907937627684940
1•tosh•22m ago•0 comments

Apify Security Breach

https://status.apify.com
4•pupppet•23m ago•1 comments

macOS on Xiaomi Pad 6S

https://www.reddit.com/r/hackintosh/comments/1xuaton/updates_on_macos_for_xiaomi_pad_6s_pro/
1•jeswin•24m ago•0 comments

The Temperamental Nature of Alligator Gender-Reveal Parties

https://nautil.us/the-temperamental-nature-of-alligator-gender-reveal-parties-1286547
2•rbanffy•28m ago•0 comments

SwiftNIO: Why ByteBuffer Has Two Cursors

https://ivantokar.com/posts/swiftnio-why-bytebuffer-has-two-cursors/
1•frizlab•30m ago•0 comments

Show HN: Armin – Modern Anki alternative with prerrequisite graphs

https://armincards.app/
1•ansanabria•30m ago•0 comments