Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace shrink

Index

Type aliases

URI: typeof shrink.URI

Variables

URI: "Shrinkable" = "Shrinkable"

Functions

  • summary

    Shrinks an array, using the provided Shrink to shrink the elements.

    todo

    Use rightDichotomy for the indexes, otherwise we'll end up far too many arrays.

    Type parameters

    • A

    Parameters

    Returns Shrink<readonly A[]>

  • boolean(r: boolean): Iterable<boolean>
  • Parameters

    • r: boolean

    Returns Iterable<boolean>

  • char(r: string): Iterable<string>
  • Parameters

    • r: string

    Returns Iterable<string>

  • imap<A, B>(f: (a: A) => B, g: (b: B) => A): (fa: Shrink<A>) => Shrink<B>
  • Type parameters

    • A

    • B

    Parameters

    • f: (a: A) => B
        • (a: A): B
        • Parameters

          • a: A

          Returns B

    • g: (b: B) => A
        • (b: B): A
        • Parameters

          • b: B

          Returns A

    Returns (fa: Shrink<A>) => Shrink<B>

  • integer(r: number): Iterable<number>
  • Parameters

    • r: number

    Returns Iterable<number>

  • partial<T>(shrinks: { readonly [ P in string | number | symbol]: Shrink<T[P]> }): Shrink<Partial<T>>
  • Type parameters

    • T: Record<string, unknown>

    Parameters

    • shrinks: { readonly [ P in string | number | symbol]: Shrink<T[P]> }

    Returns Shrink<Partial<T>>

  • string(r: string): Iterable<string>
  • Parameters

    • r: string

    Returns Iterable<string>

  • struct<T>(shrinks: { readonly [ P in string | number | symbol]: Shrink<T[P]> }): Shrink<T>
  • Type parameters

    • T: Record<string, unknown>

    Parameters

    • shrinks: { readonly [ P in string | number | symbol]: Shrink<T[P]> }

    Returns Shrink<T>

  • Type parameters

    • A

    Returns Shrink<A>

Generated using TypeDoc