( condition: boolean, message: string, Err: typeof Error = Error )
| 4 | const ZERO = new Decimal(0) |
| 5 | |
| 6 | function invariant( |
| 7 | condition: boolean, |
| 8 | message: string, |
| 9 | Err: typeof Error = Error |
| 10 | ): asserts condition { |
| 11 | if (!condition) { |
| 12 | throw new Err(message) |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * https://tc39.es/ecma262/#sec-tonumber |