Market choice discriminated union
Idiomatic TypeScript discriminated union. Use .type to narrow and .value to access payload. Follows same pattern as Media and Metadata types.
.type
.value
if (choice.type === 'Currencies') { return choice.value.suggestedCurrency;} Copy
if (choice.type === 'Currencies') { return choice.value.suggestedCurrency;}
Market choice discriminated union
Idiomatic TypeScript discriminated union. Use
.typeto narrow and.valueto access payload. Follows same pattern as Media and Metadata types.