stream#ReadableOptions TypeScript Examples

The following examples show how to use stream#ReadableOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: event-store.service.ts    From nestjs-geteventstore with MIT License 6 votes vote down vote up
public async readFromStream(
    stream: string,
    options?: ReadStreamOptions,
    readableOptions?: ReadableOptions,
  ): Promise<StreamingRead<ResolvedEvent>> {
    try {
      return this.eventStore.readStream(stream, options, readableOptions);
    } catch (e) {
      this.logger.error(`Error while reading a stream`);
      this.subsystems.onConnectionFail(e);
    }
  }
Example #2
Source File: stream-utils.ts    From mtcute with GNU Lesser General Public License v3.0 6 votes vote down vote up
constructor(webStream: ReadableStream, opts?: ReadableOptions) {
        super(opts)
        this._webStream = webStream
        this._reader = webStream.getReader()
        this._reading = false
    }
Example #3
Source File: stream-utils.ts    From mtcute with GNU Lesser General Public License v3.0 6 votes vote down vote up
export function convertWebStreamToNodeReadable(
    webStream: ReadableStream,
    opts?: ReadableOptions
): Readable {
    return new NodeReadable(webStream, opts)
}
Example #4
Source File: index.d.ts    From dropify with MIT License 5 votes vote down vote up
/**
     * Streams the rfc2822 message from the current node. If this is a root node,
     * mandatory header fields are set if missing (Date, Message-Id, MIME-Version)
     */
    createReadStream(options?: ReadableOptions): Readable;
Example #5
Source File: index.d.ts    From dropify with MIT License 5 votes vote down vote up
stream(outputStream: Readable, options: ReadableOptions, done: (err?: Error | null) => void): void;