by DanielHB · 1y ago · 0 comments
For example this is something you can do with typescript.
function(args: Arguments) { ... }
type Arguments = { a: number, b: number } | { a: number, b: string, c: number }
the Arguments { a: 1, b: 1, c: 1 } is not representable.Only if there is a niche optimization happens if T is never null, otherwise it's a tagged union.
That's not what you're replying to is about.