// some functions can return a generic `ClarityValue` type
let value = callReadOnlyFunction();
//  ^ ClarityValue
// use `isClarityType` to narrow down the type
assert(isClarityType(value, ClarityType.Int))
console.log(value)
//          ^ IntCV
Generated using TypeDoc
Narrow down the type of a generic ClarityValue