for example, I have a function called foo.
Either foo({a: bar}) or foo({b: baz}) is valid but it cannot be foo({}) or foo({a: bar, b: baz})
How do I define the types for this function to achieve this?
for example, I have a function called foo.
Either foo({a: bar}) or foo({b: baz}) is valid but it cannot be foo({}) or foo({a: bar, b: baz})
How do I define the types for this function to achieve this?