Andrew PhilipsNarrowing Multiple Return Types in TypeScriptWhile we as developers know the expected return type at compile time, the compiler may not. How can we write better function return types?May 1, 20231May 1, 20231
Andrew PhilipsNice write up.I think we can toss all of the declarations and rewrite the transform method this way:Apr 12, 20232Apr 12, 20232
Andrew PhilipsPerhaps I've missed something, but I'm pretty certain this is incorrect.Code:Apr 3, 20231Apr 3, 20231