(value: any, argName: string)
| 643 | } |
| 644 | |
| 645 | function assertString(value: any, argName: string): asserts value is string { |
| 646 | if (typeof value !== 'string') { |
| 647 | const e = new TypeError(`The "${argName}" argument must be of type string. Received type ${typeof value}`) |
| 648 | e['code'] = 'ERR_INVALID_ARG_TYPE' |
| 649 | throw e |
| 650 | } |
| 651 | } |
| 652 | |
| 653 | const bounds = { |
| 654 | int8: [-0x80, 0x7f], |