@mattpocock.com Do I need to include fields that are "never" in discriminated unions? ChatGPT keep telling me the second one is "safer" but I don't believe it.
0 reposts4 likes
@mattpocock.com Do I need to include fields that are "never" in discriminated unions? ChatGPT keep telling me the second one is "safer" but I don't believe it.
0 reposts4 likes
Wanted to see if I could figure out why and... it looks worse to me. tsplay.dev/NVDqBW It seems when the generic is involved it shifts the error to the variable and gives a less useful error. Did you ask ChatGPT its reasoning?