it is suspiciously similar to THIS:
_ |_out_
0 | 0
1 | 1
it is suspiciously similar to THIS:
_ |_out_
0 | 0
1 | 1
I've completed Parser Combinators: The Final Frontier - Advent of TypeScript 2024 adventofts.com/events/2024/24
Fuck "Type instantiation is excessively deep and possibly infinite", I wanna non termination
I saw that Andarist already answered. I just wanted to point out that article because there is no proper documentation when it comes to this topic
I wrote an article about homomorphic mapped types. I did a deep dive in the compiler to understand them
andreasimonecosta.dev/posts/what-t...
curiosity: what is the longest lookahead you are currently using in arktype?
yeah that would have made me think I wasn't solving the challenge in the intended way π
Now that you made me think about it probably I'm cheating because I'm directly using the Color type in their test as upperbound π
I suspect you ahem didn't infer something
I mean the following was enough so I don't get what you are referring to
<spoiler>
const createStreetLight = <X extends Color>(colors: X[], defaultColor: X) => {
console.log(colors);
return defaultColor;
}
</spoiler>
Wait what did you do π Which thing?
But this is less type safe and I got too many type instantiation error here and there and I didn't bother too much
@grad.dev @andarist.bsky.social
I think we could just gather all the types of the arguments till the last one to then signaling an error when the last parameter is passed if the history does not match with the order we want.
Not sure if that's what they had in mind.
I've completed Magic Curry Mind Control Inception - Advent of TypeScript 2024 adventofts.com/events/2024/16
Special cased for t4 π
with a powerful T extends [string, number, boolean] XD
@andarist.bsky.social what do you think?
Yeah I think t4 should fail as t5 and I'm not gonna waste time on that ahhahaah
I've completed Jet Fuel Pricing - Advent of TypeScript 2024 adventofts.com/events/2024/15
#AdventOfTypescript #AdventOfTS
Day 13
I've completed π©Bernard's Long List Of Names - Advent of TypeScript 2024 adventofts.com/events/2024/12
Yeah I remember I was tempted to write descriptions for some PRs of yours about reverse mapped types ahah
Another idea would be a six month vacation, I suspect the TS team will be more then happy to cover all the expenses for you and your family ππ
That's just because I have only 3 PRs in total, I have to maximize the chances of being considere.
You 575 π
. You don't need anything else than "fixes #12345"
Naming variables, git commit messages and PR titles are definitely not my strong suit π
nice experimentation by @jfet97.bsky.social going on: github.com/microsoft/Ty...
Thanks also to @andarist.bsky.social for making the switch case exhaustive!
PR: github.com/microsoft/Ty...
Playground: www.typescriptlang.org/play/?ts=5.8...
#typescript
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.
Well, thanks for your exhaustive explaination! π
Great job with that PR
Hi there @gabritto.bsky.social!
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...
#typescript
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