Type Error when using Arbitrary.to with fast-check
I'm looking at using
When I add:
I get a type error for fast-check:
Is looks like a type weirdness on fast-check's side when using esm. Has anyone else encountered this?
Arbitrary.toArbitrary.to, specifically for https://github.com/PREreview/coar-notify/blob/7ca28b9a451d22493feb001958631c9018944c84/src/Doi.ts#L25.When I add:
import { Arbitrary } from '@effect/schema'
import * as fc from 'fast-check'
export const ArbitraryDoi = Arbitrary.to(DoiSchema)(fc)import { Arbitrary } from '@effect/schema'
import * as fc from 'fast-check'
export const ArbitraryDoi = Arbitrary.to(DoiSchema)(fc)I get a type error for fast-check:
src/Doi.ts:35:53 - error TS2345: Argument of type 'typeof import("[...]/node_modules/fast-check/lib/esm/types/fast-check", { with: { "resolution-mode": "import" } })' is not assignable to parameter of type 'typeof import("[...]/node_modules/fast-check/lib/types/fast-check")'.
The types of 'fc.sample' are incompatible between these types.
Type '<Ts>(generator: import("[...]/node_modules/fast-check/lib/esm/types/check/property/IRawProperty", { with: { "resolution-mode": "import" } }).IRawProperty<Ts, boolean> | import("[...]/node_modules/fast-check/lib/esm/types/check/arbitrary/defi...' is not assignable to type '<Ts>(generator: import("[...]/node_modules/fast-check/lib/types/check/property/IRawProperty").IRawProperty<Ts, boolean> | import("[...]/node_modules/fast-check/lib/types/check/arbitrary/definition/Arbitrary").Arbitrary<Ts>, params?: number |...'.
[...]
Types of parameters 'mrng' and 'mrng' are incompatible.
Type 'import("[...]/node_modules/fast-check/lib/esm/types/random/generator/Random", { with: { "resolution-mode": "import" } }).Random' is not assignable to type 'import("[...]/node_modules/fast-check/lib/types/random/generator/Random").Random'.
Types have separate declarations of a private property 'internalRng'.src/Doi.ts:35:53 - error TS2345: Argument of type 'typeof import("[...]/node_modules/fast-check/lib/esm/types/fast-check", { with: { "resolution-mode": "import" } })' is not assignable to parameter of type 'typeof import("[...]/node_modules/fast-check/lib/types/fast-check")'.
The types of 'fc.sample' are incompatible between these types.
Type '<Ts>(generator: import("[...]/node_modules/fast-check/lib/esm/types/check/property/IRawProperty", { with: { "resolution-mode": "import" } }).IRawProperty<Ts, boolean> | import("[...]/node_modules/fast-check/lib/esm/types/check/arbitrary/defi...' is not assignable to type '<Ts>(generator: import("[...]/node_modules/fast-check/lib/types/check/property/IRawProperty").IRawProperty<Ts, boolean> | import("[...]/node_modules/fast-check/lib/types/check/arbitrary/definition/Arbitrary").Arbitrary<Ts>, params?: number |...'.
[...]
Types of parameters 'mrng' and 'mrng' are incompatible.
Type 'import("[...]/node_modules/fast-check/lib/esm/types/random/generator/Random", { with: { "resolution-mode": "import" } }).Random' is not assignable to type 'import("[...]/node_modules/fast-check/lib/types/random/generator/Random").Random'.
Types have separate declarations of a private property 'internalRng'.Is looks like a type weirdness on fast-check's side when using esm. Has anyone else encountered this?
