Skip to content

Commit

Permalink
馃悰 Fix dual-packages hazard and types incompatibility (#4842)
Browse files Browse the repository at this point in the history
  • Loading branch information
patroza committed Mar 28, 2024
1 parent 70f63fc commit 2e675d9
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .yarn/versions/1488efe6.yml
@@ -0,0 +1,8 @@
releases:
fast-check: patch

declined:
- "@fast-check/ava"
- "@fast-check/jest"
- "@fast-check/vitest"
- "@fast-check/worker"
@@ -1,6 +1,6 @@
/**
* Internal symbol used to declare an opaque type for DepthIdentifier
* @public
* @internal
*/
declare const depthIdentifierSymbol: unique symbol;

Expand All @@ -11,7 +11,10 @@ declare const depthIdentifierSymbol: unique symbol;
* @remarks Since 2.25.0
* @public
*/
export type DepthIdentifier = { [depthIdentifierSymbol]: true };
export type DepthIdentifier = {
/** @internal */
[depthIdentifierSymbol]: true;
} & DepthContext;

/**
* Instance of depth, can be used to alter the depth perceived by an arbitrary
Expand Down
Expand Up @@ -18,6 +18,7 @@ export class Value<T> {
*/
readonly hasToBeCloned: boolean;
/**
* @internal
* Flag indicating whether or not the this.value has already been called once
* If so, the underlying will be cloned
* Only set when hasToBeCloned = true
Expand Down
Expand Up @@ -4,7 +4,9 @@
* @public
*/
export class PreconditionFailure extends Error {
/** @internal */
private static readonly SharedFootPrint: symbol = Symbol('fast-check/PreconditionFailure');
/** @internal */
private readonly footprint: symbol;
constructor(readonly interruptExecution: boolean = false) {
super();
Expand Down
1 change: 1 addition & 0 deletions packages/fast-check/src/random/generator/Random.ts
Expand Up @@ -17,6 +17,7 @@ export class Random {
private static DBL_FACTOR: number = Math.pow(2, 27);
private static DBL_DIVISOR: number = Math.pow(2, -53);

/** @internal */
private internalRng: RandomGenerator;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/fast-check/src/stream/Stream.ts
Expand Up @@ -43,7 +43,7 @@ export class Stream<T> implements IterableIterator<T> {
* Create a Stream based on `g`
* @param g - Underlying data of the Stream
*/
constructor(private readonly g: IterableIterator<T>) {
constructor(/** @internal */ private readonly g: IterableIterator<T>) {
// /*DEBUG*/ this.isLive = true;
}

Expand Down

0 comments on commit 2e675d9

Please sign in to comment.