Can typescript infer from ternary operator?
Const example = test === true ? {count: 5} : {string: "string"}
Is that possible to somehow get this working.
1 Reply
What do you mean? If your function returns a ternary operator, its return type will be infered properly