Hi,
My main purpose of using serializeError is to get cause. it works perfectly but I get a following error
Property 'cause' does not exist on type 'Json & ExactOptionalGuard'.
What would be the appropriate type of it? My code is below:
const err = serializeError(e); // 'e' from smart contract error
const cause = err?.data?.cause?.reason; // Property 'cause' does not exist on type 'Json & ExactOptionalGuard'