typescript
A place to discuss TypeScript
Darryl Yeo 🛠️ pfp

@darrylyeo

Just purged a whole slew of unsafe `as` type assertions from the /walletbeat codebase. Feels good. The fix was to redefine the default type definitions for `Object.keys()`, `Object.values()`, `Object.entries()`, `Object.fromEntries()` and `Array#filter()` in a `.d.ts` file.
58 replies
31 recasts
1054 reactions

Darryl Yeo 🛠️ pfp

@darrylyeo

ArkType made a type-level parser for JavaScript regex expressions to make capture groups type-safe. Absolutely wild and clever. https://x.com/arktypeio/status/1983210635266498649
2 replies
0 recast
5 reactions

Darryl Yeo 🛠️ pfp

@darrylyeo

Adding this to my mental list of “weird and redundant-looking TypeScript features that feel like they should be the default but aren’t.” (I guess Matt Pocock needs to eat somehow.) https://x.com/colinhacks/status/1929110673537261902 https://x.com/colinhacks/status/1929179209630458212
0 reply
0 recast
1 reaction

Darryl Yeo 🛠️ pfp

@darrylyeo

Recursive types are now automatically inferred in Zod 4 👀 https://x.com/colinhacks/status/1919286275133378670
0 reply
0 recast
1 reaction

Darryl Yeo 🛠️ pfp

@darrylyeo

ArkType has been found to be over 50x faster than Zod. https://x.com/arktypeio/status/1900242780695273785
1 reply
0 recast
0 reaction

Darryl Yeo 🛠️ pfp

@darrylyeo

TypeScript 7 will be implemented in Go instead of TypeScript. https://www.youtube.com/watch?v=pNlq-EVld70
4 replies
0 recast
2 reactions

Darryl Yeo 🛠️ pfp

@darrylyeo

TypeScript types can run DOOM.
0 reply
0 recast
0 reaction

Darryl Yeo 🛠️ pfp

@darrylyeo

https://warpcast.com/monteluna/0x133a6454
0 reply
0 recast
2 reactions

Darryl Yeo 🛠️ pfp

@darrylyeo

https://warpcast.com/git/0x89fb203d
1 reply
0 recast
0 reaction

Darryl Yeo 🛠️ pfp

@darrylyeo

The new ArkType looks pretty sweet. https://x.com/arktypeio/status/1886774415267856582
0 reply
0 recast
0 reaction

dylan pfp

@dylsteck.eth

two interesting write-ups i need to read later about TS versus Rust, sparked by the news that Prisma is moving their core logic from Rust to TS! https://x.com/aboodman/status/1885089971608182968 https://x.com/prisma/status/1885009298536972307
1 reply
0 recast
1 reaction

Darryl Yeo 🛠️ pfp

@darrylyeo

https://warpcast.com/darrylyeo/0x0549cdc0
0 reply
0 recast
0 reaction

Darryl Yeo 🛠️ pfp

@darrylyeo

How to implement type-safe JSON strings and extend `JSON.parse()` and `JSON.stringify()` to automatically infer them. Genius. https://youtu.be/z7pDvyVhUnE
1 reply
0 recast
3 reactions

typeof.eth pfp

@typeof.eth

I love when people make things for no other reason than to show that it’s possible E.g. SQL queries implemented as typescript types. Not my work TS playground: https://tinyurl.com/t9ajc8tw Repo: https://github.com/codemix/ts-sql
0 reply
0 recast
3 reactions

Darryl Yeo 🛠️ pfp

@darrylyeo

Type Buddy: a VSCode plugin / web app that lets you write complex TypeScript types with JavaScript-like syntax and vice-versa https://youtu.be/CfUoc3ep9KY
2 replies
0 recast
1 reaction