ts-data-forge
    Preparing search index...

    Function pipe

    • Creates a new pipe object that allows for chaining operations on a value.

      This function provides a fluent interface for applying transformations to values, with intelligent method selection based on the input type:

      • For Optional values: Provides mapOptional for safe Optional transformations
      • For other values: Provides mapNullable for null-safe transformations
      • All types get the basic map method for general transformations

      The pipe maintains type safety throughout the chain, automatically selecting the appropriate overload based on the current value type.

      Type Parameters

      • const A extends Optional.Base

        The type of the initial value to wrap in a pipe.

      Parameters

      • a: A

        The initial value to wrap in a pipe.

      Returns PipeWithMapOptional<A>

      A pipe object with chaining methods appropriate for the value type.

    • Creates a new pipe object that allows for chaining operations on a value.

      This function provides a fluent interface for applying transformations to values, with intelligent method selection based on the input type:

      • For Optional values: Provides mapOptional for safe Optional transformations
      • For other values: Provides mapNullable for null-safe transformations
      • All types get the basic map method for general transformations

      The pipe maintains type safety throughout the chain, automatically selecting the appropriate overload based on the current value type.

      Type Parameters

      • const A

        The type of the initial value to wrap in a pipe.

      Parameters

      • a: A

        The initial value to wrap in a pipe.

      Returns PipeBase<A>

      A pipe object with chaining methods appropriate for the value type.