it is suspiciously similar to THIS:
_ |_out_
0 | 0
1 | 1
@jfet97.bsky.social
Just some TypeScript here https://andreasimonecosta.dev/posts/
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
22.12.2024 16:29 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0I 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?
20.12.2024 10:30 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0yeah that would have made me think I wasn't solving the challenge in the intended way ๐
18.12.2024 09:16 โ ๐ 2 ๐ 0 ๐ฌ 0 ๐ 0Now that you made me think about it probably I'm cheating because I'm directly using the Color type in their test as upperbound ๐
18.12.2024 09:08 โ ๐ 2 ๐ 0 ๐ฌ 1 ๐ 0I suspect you ahem didn't infer something
18.12.2024 08:53 โ ๐ 2 ๐ 0 ๐ฌ 1 ๐ 0I 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?
18.12.2024 08:49 โ ๐ 2 ๐ 0 ๐ฌ 1 ๐ 0But this is less type safe and I got too many type instantiation error here and there and I didn't bother too much
16.12.2024 08:49 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0@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?
16.12.2024 07:57 โ ๐ 1 ๐ 0 ๐ฌ 2 ๐ 0Yeah I think t4 should fail as t5 and I'm not gonna waste time on that ahhahaah
16.12.2024 07:56 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0I've completed Jet Fuel Pricing - Advent of TypeScript 2024 adventofts.com/events/2024/15
15.12.2024 12:37 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0#AdventOfTypescript #AdventOfTS
Day 13
I've completed ๐ฉBernard's Long List Of Names - Advent of TypeScript 2024 adventofts.com/events/2024/12
12.12.2024 12:47 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0Yeah 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 ๐
10.12.2024 17:43 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0nice experimentation by @jfet97.bsky.social going on: github.com/microsoft/Ty...
10.12.2024 16:31 โ ๐ 8 ๐ 1 ๐ฌ 2 ๐ 0Thanks 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