Function totality
Sep 9, 2023 · 1 min read · A function is considered total when it is defined for all possible inputs. Below is an example of a function that fails to meet this requirement. type One = 1 type Two = 2 type Three = 3 type SumType = One | Two | Three function fn(num: SumType): st...
Join discussion