We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20a5c6a commit c34d8f8Copy full SHA for c34d8f8
src/stable/lib/error.ts
@@ -45,6 +45,12 @@ export function validateUnsignedInteger(
45
throw new Error(`${errorPrefix} cannot be negative`);
46
}
47
48
+ if (size > 53) {
49
+ throw new Error(
50
+ `${errorPrefix} to remain within safe integer bounds, size cannot be greater than 53`
51
+ );
52
+ }
53
+
54
const maxUnsignedInteger = Math.pow(2, size) - 1;
55
56
if (number > maxUnsignedInteger) {
0 commit comments