Interface OutStream<Out>

An OutStream represents the interface for writing to a stream

Type Parameters

  • Out

    The type of messages that will be written to the stream

Hierarchy

  • OutStream

Properties

Properties

close: (() => void)

Type declaration

    • (): void
    • Closes the stream

      Returns void

error: ((error: Error) => void)

Type declaration

    • (error: Error): void
    • Transmits an error event along the stream

      Parameters

      • error: Error

      Returns void

mapOut: (<Out2>(fn: ((output: Out) => Out2)) => OutStream<Out2>)

Type declaration

    • <Out2>(fn: ((output: Out) => Out2)): OutStream<Out2>
    • Creates a new OutStream of a different type by converting all of this streams outputs to a different type

      Type Parameters

      • Out2

        the new OutStream object type

      Parameters

      • fn: ((output: Out) => Out2)

        The method for converting between types

          • (output: Out): Out2
          • Parameters

            • output: Out

            Returns Out2

      Returns OutStream<Out2>

write: ((out: Out) => void)

Type declaration

    • (out: Out): void
    • Writes the out object to the stream

      Parameters

      • out: Out

      Returns void

Generated using TypeDoc