From b0d8c85057942a96b5df4934525563a85be203da Mon Sep 17 00:00:00 2001 From: kwingram25 Date: Wed, 8 May 2019 11:38:44 +0200 Subject: [PATCH] Remove BnList type (#402) * Add BN min/max * fixes * array 2+ type * assert * rv hardcoding * remove list type * rv import --- packages/util/src/bn/max.ts | 3 +-- packages/util/src/bn/min.ts | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/util/src/bn/max.ts b/packages/util/src/bn/max.ts index 2e05e31dd..7df399ded 100644 --- a/packages/util/src/bn/max.ts +++ b/packages/util/src/bn/max.ts @@ -5,7 +5,6 @@ import BN from 'bn.js'; import assert from '../assert'; -import { BnList } from '../types'; /** * @name max @@ -21,7 +20,7 @@ import { BnList } from '../types'; * ``` */ export default function max ( - ...items: BnList + ...items: BN[] ): BN { assert( items && items.length >= 2, diff --git a/packages/util/src/bn/min.ts b/packages/util/src/bn/min.ts index a9b71fc49..f17674acf 100644 --- a/packages/util/src/bn/min.ts +++ b/packages/util/src/bn/min.ts @@ -5,7 +5,7 @@ import BN from 'bn.js'; import assert from '../assert'; -import { BnList } from '../types'; + /** * @name min * @summary Finds and returns the smallest value in an array of BNs. @@ -20,7 +20,7 @@ import { BnList } from '../types'; * ``` */ export default function min ( - ...items: BnList + ...items: BN[] ): BN { assert( items && items.length >= 2,