• Type Parameters

    Parameters

    Returns input is ClarityTypetoValue[T]

    Description

    narrow down the type of a generic ClarityValue

    Example

    // 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