Originally posted by **Dhaiwat10** March 7, 2024
Take this Sway function signature for example:
```sw
fn new_game(player: Identity);
```
If you try to call this function via the TS SDK, it would look something like this:
```ts
await contract.functions.new_game({ Address: { value: walletAddress });
await contract.functions.new_game({ ContractId: { value: contractId });
```
The idea is to change it to something like:
```ts
type Identity = {address: string, contractId?: never} | {address?: never; contractId: string}
await contract.functions.new_game({ address: walletAddress });
await contract.functions.new_game({ contractId: contractId });
```
Discussed in https://github.com/FuelLabs/fuels-ts/discussions/1844
It seems to me that we can generalize this approach for all enums, not just the
Identity
one? For example, this is currently possible:But we'd want to only provide
Value
orData
.