@hegeldev/hegel
    Preparing search index...

    Class Generator<T>Abstract

    Base class for all generators. Generators produce values of type T synchronously by communicating with the hegel server.

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Only keep values that satisfy the predicate. Retries up to 3 times, then rejects the test case.

      Parameters

      • predicate: (value: T) => boolean

      Returns Generator<T>

    • Transform generated values using a function. When the source has a schema, the schema is preserved.

      Type Parameters

      • U

      Parameters

      • f: (value: T) => U

      Returns Generator<U>