Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🗑️ Deprecate bigInt's alternatives #5238

Merged
merged 6 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/fast-check/src/arbitrary/bigIntN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { BigIntArbitrary } from './_internals/BigIntArbitrary';
*
* @param n - Maximal number of bits of the generated bigint
*
* @deprecated Please use ${@link bigInt} with `fc.bigInt({ min: -2n**(n-1n), max: 2n**(n-1n) })` instead
dubzzz marked this conversation as resolved.
Show resolved Hide resolved
* @remarks Since 1.9.0
* @public
*/
Expand Down
4 changes: 3 additions & 1 deletion packages/fast-check/src/arbitrary/bigUint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function computeDefaultMax(): bigint {

/**
* For positive bigint
* @deprecated Please use ${@link bigInt} with `fc.bigInt({ min: 0n })` instead
* @remarks Since 1.9.0
* @public
*/
Expand All @@ -30,7 +31,7 @@ function bigUint(): Arbitrary<bigint>;
* For positive bigint between 0 (included) and max (included)
*
* @param max - Upper bound for the generated bigint
*
* @deprecated Please use ${@link bigInt} with `fc.bigInt({ min: 0n, max })` instead
* @remarks Since 1.9.0
* @public
*/
Expand All @@ -40,6 +41,7 @@ function bigUint(max: bigint): Arbitrary<bigint>;
*
* @param constraints - Constraints to apply when building instances
*
* @deprecated Please use ${@link bigInt} with `fc.bigInt({ min: 0n, max })` instead
* @remarks Since 2.6.0
* @public
*/
Expand Down
1 change: 1 addition & 0 deletions packages/fast-check/src/arbitrary/bigUintN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { BigIntArbitrary } from './_internals/BigIntArbitrary';
*
* @param n - Maximal number of bits of the generated bigint
*
* @deprecated Please use ${@link bigInt} with `fc.bigInt({ min: 0n, max: 2n**n-1n })` instead
* @remarks Since 1.9.0
* @public
*/
Expand Down
Loading