diff --git a/packages/types/src/codec/AbstractInt.ts b/packages/types/src/codec/AbstractInt.ts index 049234d9b8..f2dbf565d9 100644 --- a/packages/types/src/codec/AbstractInt.ts +++ b/packages/types/src/codec/AbstractInt.ts @@ -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()); } diff --git a/packages/types/src/codec/Compact.ts b/packages/types/src/codec/Compact.ts index 8418e60669..1f8e6d29c0 100644 --- a/packages/types/src/codec/Compact.ts +++ b/packages/types/src/codec/Compact.ts @@ -95,7 +95,7 @@ export class Compact implements ICompact { /** * @description Returns a BigInt representation of the number */ - public toBigInt (): BigInt { + public toBigInt (): bigint { return BigInt(this.toString()); } diff --git a/packages/types/src/codec/Date.ts b/packages/types/src/codec/Date.ts index 4ad7d17e47..7cc141a39f 100644 --- a/packages/types/src/codec/Date.ts +++ b/packages/types/src/codec/Date.ts @@ -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()); } diff --git a/packages/types/src/types/interfaces.ts b/packages/types/src/types/interfaces.ts index b9ee6340cd..675b60c37d 100644 --- a/packages/types/src/types/interfaces.ts +++ b/packages/types/src/types/interfaces.ts @@ -8,7 +8,7 @@ import type { Hash } from '../interfaces/runtime'; import type { AnyTuple, ArgsDef, Codec } from './codec'; export interface ICompact extends Codec { - toBigInt (): BigInt; + toBigInt (): bigint; toBn (): BN; toNumber (): number; unwrap (): T;