From 4cfa6ec95f70237fcd6ebb8620c6afdba7639295 Mon Sep 17 00:00:00 2001 From: dfahlander Date: Tue, 2 Jul 2024 00:31:05 +0200 Subject: [PATCH] Use native bigint type instead of BigInt object type --- src/functions/propmods/add.ts | 2 +- src/functions/propmods/remove.ts | 2 +- src/helpers/prop-modification.ts | 4 ++-- src/public/types/prop-modification.d.ts | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/functions/propmods/add.ts b/src/functions/propmods/add.ts index 2a4e525c9..1e28f8d8d 100644 --- a/src/functions/propmods/add.ts +++ b/src/functions/propmods/add.ts @@ -1,5 +1,5 @@ import { PropModification } from "../../helpers/prop-modification"; -export function add(value: number | BigInt | Array) { +export function add(value: number | bigint | Array) { return new PropModification({add: value}); } diff --git a/src/functions/propmods/remove.ts b/src/functions/propmods/remove.ts index 6c51e1bba..c0c9b3ace 100644 --- a/src/functions/propmods/remove.ts +++ b/src/functions/propmods/remove.ts @@ -1,5 +1,5 @@ import { PropModification } from "../../helpers/prop-modification"; -export function remove(value: number | BigInt | Array) { +export function remove(value: number | bigint | Array) { return new PropModification({remove: value}); } diff --git a/src/helpers/prop-modification.ts b/src/helpers/prop-modification.ts index daf6a0140..69bf25891 100644 --- a/src/helpers/prop-modification.ts +++ b/src/helpers/prop-modification.ts @@ -28,8 +28,8 @@ export const PropModSymbol: unique symbol = Symbol(); export class PropModification implements PropModSpec { [PropModSymbol]?: true; replacePrefix?: [string, string]; - add?: number | BigInt | Array; - remove?: number | BigInt | Array; + add?: number | bigint | Array; + remove?: number | bigint | Array; execute(value: any): any { // add (mathematical or set-wise) diff --git a/src/public/types/prop-modification.d.ts b/src/public/types/prop-modification.d.ts index 64e9a7d5f..be8c85f44 100644 --- a/src/public/types/prop-modification.d.ts +++ b/src/public/types/prop-modification.d.ts @@ -2,15 +2,15 @@ export declare const PropModSymbol: unique symbol; export type PropModSpec = { replacePrefix?: [string, string]; - add?: number | BigInt | Array; - remove?: number | BigInt | Array; + add?: number | bigint | Array; + remove?: number | bigint | Array; } export class PropModification implements PropModSpec { [PropModSymbol]?: true; replacePrefix?: [string, string]; - add?: number | BigInt | Array; - remove?: number | BigInt | Array; + add?: number | bigint | Array; + remove?: number | bigint | Array; execute(value: T): T;