Type alias GetConstructorArgs<TAbi, TAbiConstructor, TArgs, FailedToParseArgs>

GetConstructorArgs<TAbi, TAbiConstructor, TArgs, FailedToParseArgs>: true extends FailedToParseArgs
    ? {
        args?: readonly unknown[];
    }
    : TArgs extends readonly []
        ? {
            args?: never;
        }
        : {
            args: TArgs;
        }

Type Parameters

  • TAbi extends Abi | readonly unknown[]

  • TAbiConstructor extends AbiConstructor = TAbi extends Abi
        ? Extract<TAbi[number], {
            type: "constructor";
        }>
        : AbiConstructor

  • TArgs = AbiParametersToPrimitiveTypes<TAbiConstructor["inputs"]>

  • FailedToParseArgs = ([TArgs] extends [never]
        ? true
        : false) | (readonly unknown[] extends TArgs
        ? true
        : false)

Generated using TypeDoc