Fuck "Type instantiation is excessively deep and possibly infinite", I wanna non termination
Fuck "Type instantiation is excessively deep and possibly infinite", I wanna non termination
Special cased for t4 😅 with a powerful T extends [string, number, boolean] XD
Special cased for t4 😅 with a powerful T extends [string, number, boolean] XD
The next TypeScript compiler update will be exciting!
PR #56941 by @gabritto.bsky.social improves support for conditional and indexed access types as return types, enabling proper typing for functions like the one in the snippet without clunky hacks or dubious overloads.
The next TypeScript compiler update will be exciting!
PR #56941 by @gabritto.bsky.social improves support for conditional and indexed access types as return types, enabling proper typing for functions like the one in the snippet without clunky hacks or dubious overloads.
I'm playing with your PR and I got a couple of non working cases (and some combinations), but I can't find the reason in the description of the PR. Would you mind to have a look? Thanks!
www.typescriptlang.org/play/?ts=5.8...
I'm playing with your PR and I got a couple of non working cases (and some combinations), but I can't find the reason in the description of the PR. Would you mind to have a look? Thanks!
www.typescriptlang.org/play/?ts=5.8...
Immediate access in the realm of values is not deferred, but `to` has a type param as type so TS can only resort to its constraint. OTOH in the realm of types `T["property"]` stays deferred, so indirect access is well typed.
@andarist.bsky.social highlight of the day from our chat
Immediate access in the realm of values is not deferred, but `to` has a type param as type so TS can only resort to its constraint. OTOH in the realm of types `T["property"]` stays deferred, so indirect access is well typed.
@andarist.bsky.social highlight of the day from our chat
The new era of conditional types checking is coming in TypeScript 5.8!
The new era of conditional types checking is coming in TypeScript 5.8!
If your team struggles with...
🧩 Writing complex types to optimize DX
☠️ tsserver lag in editor
🧪 Type testing or benchmarking
I can help! If not, retweets also really help💖
If your team struggles with...
🧩 Writing complex types to optimize DX
☠️ tsserver lag in editor
🧪 Type testing or benchmarking
I can help! If not, retweets also really help💖