@@ -90,6 +90,7 @@ interface BigInt {
90
90
/**
91
91
* Returns a string representation of an object.
92
92
* @param radix Specifies a radix for converting numeric values to strings.
93
+ * @throws {RangeError } If `radix` is less than 2 or greater than 36.
93
94
*/
94
95
toString ( radix ?: number ) : string ;
95
96
@@ -103,6 +104,14 @@ interface BigInt {
103
104
}
104
105
105
106
interface BigIntConstructor {
107
+ /**
108
+ * Creates a BigInt value from a number, string, boolean, or another BigInt.
109
+ *
110
+ * @param value The value to convert to a BigInt.
111
+ * @throws {RangeError } If `value` is a non-integer number.
112
+ * @throws {TypeError } If `value` cannot be converted to a primitive, or if the primitive is undefined, null, or a symbol.
113
+ * @throws {SyntaxError } If `value` is a string that cannot be parsed as a BigInt.
114
+ */
106
115
( value : bigint | boolean | number | string ) : bigint ;
107
116
readonly prototype : BigInt ;
108
117
@@ -111,13 +120,15 @@ interface BigIntConstructor {
111
120
* All higher bits are discarded.
112
121
* @param bits The number of low bits to use
113
122
* @param int The BigInt whose bits to extract
123
+ * @throws {RangeError } If `bits` is negative or greater than 2 ** 53 - 1.
114
124
*/
115
125
asIntN ( bits : number , int : bigint ) : bigint ;
116
126
/**
117
127
* Interprets the low bits of a BigInt as an unsigned integer.
118
128
* All higher bits are discarded.
119
129
* @param bits The number of low bits to use
120
130
* @param int The BigInt whose bits to extract
131
+ * @throws {RangeError } If `bits` is negative or greater than 2 ** 53 - 1.
121
132
*/
122
133
asUintN ( bits : number , int : bigint ) : bigint ;
123
134
}
0 commit comments