formatBalance adjustments (#536)

* formatBalance extensions

* Fly-by any removals

* isBn updates

* Remove unneeded ()'s
This commit is contained in:
Jaco Greeff
2020-02-17 12:16:02 +01:00
committed by GitHub
parent dca36e41fd
commit 171015fbba
8 changed files with 38 additions and 22 deletions
+1 -2
View File
@@ -22,8 +22,7 @@ type MessageFn = () => string;
* assert(false, () => 'message'); // Error with 'message'
* ```
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export default function assert (condition: any, message: string | MessageFn): asserts condition {
export default function assert (condition: boolean | object | string | number | undefined | null, message: string | MessageFn): asserts condition {
if (!condition) {
throw new Error(
isFunction(message)