_ |_out_
0 | 0
1 | 1
_ |_out_
0 | 0
1 | 1
andreasimonecosta.dev/posts/what-t...
andreasimonecosta.dev/posts/what-t...
<spoiler>
const createStreetLight = <X extends Color>(colors: X[], defaultColor: X) => {
console.log(colors);
return defaultColor;
}
</spoiler>
<spoiler>
const createStreetLight = <X extends Color>(colors: X[], defaultColor: X) => {
console.log(colors);
return defaultColor;
}
</spoiler>
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 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.
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 😜😂
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 😜😂
You 575 😅. You don't need anything else than "fixes #12345"
You 575 😅. You don't need anything else than "fixes #12345"
PR: github.com/microsoft/Ty...
Playground: www.typescriptlang.org/play/?ts=5.8...
PR: github.com/microsoft/Ty...
Playground: www.typescriptlang.org/play/?ts=5.8...