Skip to content

Commit

Permalink
Use native bigint type instead of BigInt object type
Browse files Browse the repository at this point in the history
  • Loading branch information
dfahlander committed Jul 1, 2024
1 parent 4361ca6 commit 4cfa6ec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/functions/propmods/add.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PropModification } from "../../helpers/prop-modification";

export function add(value: number | BigInt | Array<string | number>) {
export function add(value: number | bigint | Array<string | number>) {
return new PropModification({add: value});
}
2 changes: 1 addition & 1 deletion src/functions/propmods/remove.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PropModification } from "../../helpers/prop-modification";

export function remove(value: number | BigInt | Array<string | number>) {
export function remove(value: number | bigint | Array<string | number>) {
return new PropModification({remove: value});
}
4 changes: 2 additions & 2 deletions src/helpers/prop-modification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const PropModSymbol: unique symbol = Symbol();
export class PropModification implements PropModSpec {
[PropModSymbol]?: true;
replacePrefix?: [string, string];
add?: number | BigInt | Array<string | number>;
remove?: number | BigInt | Array<string | number>;
add?: number | bigint | Array<string | number>;
remove?: number | bigint | Array<string | number>;

execute(value: any): any {
// add (mathematical or set-wise)
Expand Down
8 changes: 4 additions & 4 deletions src/public/types/prop-modification.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ export declare const PropModSymbol: unique symbol;

export type PropModSpec = {
replacePrefix?: [string, string];
add?: number | BigInt | Array<string | number>;
remove?: number | BigInt | Array<string | number>;
add?: number | bigint | Array<string | number>;
remove?: number | bigint | Array<string | number>;
}

export class PropModification implements PropModSpec {
[PropModSymbol]?: true;
replacePrefix?: [string, string];
add?: number | BigInt | Array<string | number>;
remove?: number | BigInt | Array<string | number>;
add?: number | bigint | Array<string | number>;
remove?: number | bigint | Array<string | number>;

execute<T>(value: T): T;

Expand Down

0 comments on commit 4cfa6ec

Please sign in to comment.