diff options
author | kao <zichongkao@gmail.com> | 2018-12-08 08:35:00 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-13 01:19:31 +0800 |
commit | 93422eab55f674ed33168a4731884e54d5a9ca78 (patch) | |
tree | a3829d1abdfd07171319db5454d9a4336fc62888 /packages/utils/src | |
parent | 74e07b63de9688aa0dca2ce69863203766db6008 (diff) | |
download | dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar.gz dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar.bz2 dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar.lz dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar.xz dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar.zst dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.zip |
Implement prefer-template tslint rule
Diffstat (limited to 'packages/utils/src')
-rw-r--r-- | packages/utils/src/abi_utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/utils/src/abi_utils.ts b/packages/utils/src/abi_utils.ts index 598ea5fcc..3e6fc9665 100644 --- a/packages/utils/src/abi_utils.ts +++ b/packages/utils/src/abi_utils.ts @@ -26,7 +26,7 @@ function parseEthersParams(params: DataItem[]): { names: ParamName[]; types: str const result = parseEthersParams(param.components); names.push({ name: param.name || null, names: result.names }); - types.push('tuple(' + result.types.join(',') + ')' + suffix); + types.push(`tuple(${result.types.join(',')})${suffix}`); } else { names.push(param.name || null); types.push(param.type); @@ -120,7 +120,7 @@ function splitTupleTypes(type: string): string[] { if (_.endsWith(type, '[]')) { throw new Error('Internal error: array types are not supported'); } else if (!_.startsWith(type, 'tuple(')) { - throw new Error('Internal error: expected tuple type but got non-tuple type: ' + type); + throw new Error(`Internal error: expected tuple type but got non-tuple type: ${type}`); } // Trim the outtermost tuple(). const trimmedType = type.substring('tuple('.length, type.length - 1); |