MCPcopy Create free account
hub / github.com/Effect-TS/effect / arrayFromItems

Function arrayFromItems

packages/effect/src/Schema.ts:11010–11019  ·  view source on GitHub ↗
(
  fc: typeof FastCheck,
  item: FastCheck.Arbitrary<T>,
  constraints: FastCheck.ArrayConstraints | undefined,
  comparator?: ((a: T, b: T) => boolean) | undefined
)

Source from the content-addressed store, hash-verified

11008}
11009
11010function arrayFromItems<T>(
11011 fc: typeof FastCheck,
11012 item: FastCheck.Arbitrary<T>,
11013 constraints: FastCheck.ArrayConstraints | undefined,
11014 comparator?: ((a: T, b: T) => boolean) | undefined
11015) {
11016 return comparator === undefined
11017 ? fc.array(item, constraints)
11018 : fc.uniqueArray(item, { ...constraints, comparator })
11019}
11020
11021function collectionArbitrary<T, Out>(
11022 fc: typeof FastCheck,

Callers 1

collectionArbitraryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected