toBigInt() uses primitive type bigint (#3047)

This commit is contained in:
Ian He
2021-01-13 09:01:11 +01:00
committed by GitHub
parent e005a3fc0c
commit 61d2e6c5e5
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ export abstract class AbstractInt extends BN implements Codec {
/**
* @description Returns a BigInt representation of the number
*/
public toBigInt (): BigInt {
public toBigInt (): bigint {
return BigInt(this.toString());
}
+1 -1
View File
@@ -95,7 +95,7 @@ export class Compact<T extends CompactEncodable> implements ICompact<T> {
/**
* @description Returns a BigInt representation of the number
*/
public toBigInt (): BigInt {
public toBigInt (): bigint {
return BigInt(this.toString());
}
+1 -1
View File
@@ -83,7 +83,7 @@ export class CodecDate extends Date implements Codec {
/**
* @description Returns a BigInt representation of the number
*/
public toBigInt (): BigInt {
public toBigInt (): bigint {
return BigInt(this.toNumber());
}
+1 -1
View File
@@ -8,7 +8,7 @@ import type { Hash } from '../interfaces/runtime';
import type { AnyTuple, ArgsDef, Codec } from './codec';
export interface ICompact<T> extends Codec {
toBigInt (): BigInt;
toBigInt (): bigint;
toBn (): BN;
toNumber (): number;
unwrap (): T;