• Helper function to check if all the component are presented satisfying all the requirement.

    Type Parameters

    • RC extends "signerBalanceAllowanceChecker" | "approvedSignerAddressGetter" | "syIOTokenAmountGetter" | "aggregatorResultGetter" | "intermediateSyAmountGetter" | "limitOrderMatcher" | "contractMethodBuilder" | "gasUsedEstimator" | "netOutGetter" | "netOutInNativeEstimator"

    Parameters

    Returns PartialRoute<RC>

    Remarks

    Using object literal does not check the component's requirement. For example:

    const route = {
    syIOTokenAmountGetter: {} as SYIOTokenAmountGetter<'approvedSignerAddressGetter'>
    }

    Here syIOTokenAmountGetter requires 'approvedSignerAddressGetter' to be presented in the route, but in reality it does not existed.

    Using this function can help detect the missing requirement:

    Example

    const route = Route.assemble({
    syIOTokenAmountGetter: {} as SYIOTokenAmountGetter<'approvedSignerAddressGetter'>
    });

    Now Typescript will yell at this case.

Generated using TypeDoc