Explain cast to any

This commit is contained in:
Fabio Berger
2018-09-27 23:24:05 +01:00
parent e0ff3484cf
commit b2ff7bda02

View File

@@ -422,6 +422,8 @@ function _generateCustomTypeHash(customType: CustomType): string {
function _getStructsAsCustomTypes(abiDefinition: AbiDefinition): CustomType[] {
const customTypes: CustomType[] = [];
// We cast to `any` here because we do not know yet if this type of abiDefinition contains
// an `input` key
if (!_.isUndefined((abiDefinition as any).inputs)) {
const methodOrConstructorAbi = abiDefinition as MethodAbi | ConstructorAbi;
_.each(methodOrConstructorAbi.inputs, input => {