Home / File/ streams.js — react Source File

streams.js — react Source File

Architecture documentation for streams.js, a javascript file in the react codebase.

File javascript 3 classes

Entity Profile

Relationship Graph

Source Code

// flow-typed signature: e6e6768618776352dd676f63502aea4d
// flow-typed version: 40e7dfcbd5/streams/flow_>=v0.261.x

type TextEncodeOptions = {options?: boolean, ...};

declare class ReadableStreamController {
  constructor(
    stream: ReadableStream,
    underlyingSource: UnderlyingSource,
    size: number,
    highWaterMark: number
  ): void;

  desiredSize: number;

  close(): void;
  enqueue(chunk: any): void;
  error(error: Error): void;
}

declare class ReadableStreamBYOBRequest {
  constructor(controller: ReadableStreamController, view: $TypedArray): void;

  view: $TypedArray;

  respond(bytesWritten: number): ?any;
  respondWithNewView(view: $TypedArray): ?any;
}

declare class ReadableByteStreamController extends ReadableStreamController {
  constructor(
    stream: ReadableStream,
    underlyingSource: UnderlyingSource,
    highWaterMark: number
  ): void;

  byobRequest: ReadableStreamBYOBRequest;
}

declare class ReadableStreamReader {
  constructor(stream: ReadableStream): void;

  closed: boolean;

  cancel(reason: string): void;
  read(): Promise<{
    value: ?any,
    done: boolean,
    ...
  }>;
  releaseLock(): void;
}

declare interface UnderlyingSource {
  autoAllocateChunkSize?: number;
  type?: string;

  start?: (controller: ReadableStreamController) => ?Promise<void>;
  pull?: (controller: ReadableStreamController) => ?Promise<void>;
  cancel?: (reason: string) => ?Promise<void>;
// ... (77 more lines)

Frequently Asked Questions

What does streams.js do?
streams.js is a source file in the react codebase, written in javascript.
Where is streams.js in the architecture?
streams.js is located at flow-typed/environments/streams.js (directory: flow-typed/environments).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free