Skip to content

Commit 25cfbb7

Browse files
Fix bigInt syntax for older parsers compatibility (#33549)
1 parent fd3d2ce commit 25cfbb7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

  • packages/devextreme/js/__internal/core/license/lcp_key_validation

packages/devextreme/js/__internal/core/license/lcp_key_validation/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { bit } from './utils';
33

44
const productKind = {
5-
Default: 0n,
5+
Default: BigInt(0),
66
DXperienceWin: bit(0),
77
XtraReports: bit(4),
88
XPO: bit(15),

packages/devextreme/js/__internal/core/license/lcp_key_validation/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { compareSignatures } from '../rsa_bigint';
66
import { sha1 } from '../sha1';
77
import { DECODE_MAP } from './const';
88

9-
export const bit = (shift: number): bigint => 1n << BigInt(shift);
9+
export const bit = (shift: number): bigint => BigInt(1) << BigInt(shift);
1010

1111
export const parseRsaXml = (xml: string): { modulus: Uint8Array; exponent: number } => {
1212
const modulusMatch = /<Modulus>([^<]+)<\/Modulus>/.exec(xml);
@@ -51,9 +51,9 @@ export const shiftText = (text: string, map: string): string => {
5151

5252
export const shiftDecodeText = (text: string): string => shiftText(text, DECODE_MAP);
5353

54-
const DOT_NET_TICKS_EPOCH_OFFSET = 621355968000000000n;
55-
const DOT_NET_TICKS_PER_MS = 10000n;
56-
const DOT_NET_MAX_VALUE_TICKS = 3155378975999999999n;
54+
const DOT_NET_TICKS_EPOCH_OFFSET = BigInt('621355968000000000');
55+
const DOT_NET_TICKS_PER_MS = BigInt(10000);
56+
const DOT_NET_MAX_VALUE_TICKS = BigInt('3155378975999999999');
5757

5858
export function dotNetTicksToMs(ticksStr: string): number {
5959
const ticks = BigInt(ticksStr);

0 commit comments

Comments
 (0)