mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-24 11:29:30 +08:00
Merge pull request #6468 from raphj/master
"base" parameter for big-integer
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
var noArgument = bigInt(),
|
||||
numberArgument = bigInt( 93 ),
|
||||
stringArgument = bigInt( "75643564363473453456342378564387956906736546456235345" ),
|
||||
baseArgumentInt = bigInt( "101010", 2 ),
|
||||
baseArgumentStr = bigInt( "101010", "2" ),
|
||||
baseArgumentBi = bigInt( "101010", bigInt( 2 ) ),
|
||||
bigIntArgument = bigInt( noArgument );
|
||||
|
||||
// method tests
|
||||
@@ -111,4 +114,4 @@ isNumber = x.toJSNumber();
|
||||
|
||||
isString = x.toString();
|
||||
|
||||
isNumber = x.valueOf();
|
||||
isNumber = x.valueOf();
|
||||
|
||||
Vendored
+2
-2
@@ -214,7 +214,7 @@ interface BigIntegerStatic {
|
||||
/** Parse a Javascript number into a bigInt */
|
||||
( number: number ): BigInteger;
|
||||
/** Parse a string into a bigInt */
|
||||
( string: string ): BigInteger;
|
||||
( string: string, base?: string | number | BigInteger): BigInteger;
|
||||
/** no-op */
|
||||
( bigInt: BigInteger ): BigInteger;
|
||||
}
|
||||
@@ -223,4 +223,4 @@ declare var bigInt: BigIntegerStatic;
|
||||
|
||||
declare module "big-integer" {
|
||||
export = bigInt;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user