({
max,
min,
signed,
size,
value,
}: {
max?: string | undefined
min: string
signed?: boolean | undefined
size?: number | undefined
value: string
})
| 7 | } |
| 8 | export class IntegerOutOfRangeError extends BaseError { |
| 9 | constructor({ |
| 10 | max, |
| 11 | min, |
| 12 | signed, |
| 13 | size, |
| 14 | value, |
| 15 | }: { |
| 16 | max?: string | undefined |
| 17 | min: string |
| 18 | signed?: boolean | undefined |
| 19 | size?: number | undefined |
| 20 | value: string |
| 21 | }) { |
| 22 | super( |
| 23 | `Number "${value}" is not in safe ${ |
| 24 | size ? `${size * 8}-bit ${signed ? 'signed' : 'unsigned'} ` : '' |
| 25 | }integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, |
| 26 | { name: 'IntegerOutOfRangeError' }, |
| 27 | ) |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | export type InvalidBytesBooleanErrorType = InvalidBytesBooleanError & { |
nothing calls this directly
no outgoing calls
no test coverage detected