Files
common/packages/x-bigint/src/index.ts
T
2022-01-01 09:26:11 +02:00

11 lines
398 B
TypeScript

// Copyright 2017-2022 @polkadot/x-bigint authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { xglobal } from '@polkadot/x-global';
export { packageInfo } from './packageInfo';
export const BigInt: BigIntConstructor = typeof xglobal.BigInt === 'function' && typeof xglobal.BigInt.asIntN === 'function'
? xglobal.BigInt
: (() => Number.NaN) as unknown as BigIntConstructor;