Setu-TS
    Preparing search index...

    Type Alias ResponseSnapshot

    ResponseSnapshot:
        | {
            body: Uint8Array
            | string
            | null;
            headers: Headers;
            responseInit?: ResponseSnapshotInit;
            status: number;
            streaming: false;
        }
        | {
            body: ReadableStream<Uint8Array>;
            headers: Headers;
            responseInit?: ResponseSnapshotInit;
            status: number;
            streaming: true;
        }

    Discriminated union representing the possible shapes of an IResponse snapshot. When streaming is false, body is a buffered Uint8Array | string | null. When streaming is true, body is a live ReadableStream<Uint8Array>.

    Type Declaration

    • {
          body: Uint8Array | string | null;
          headers: Headers;
          responseInit?: ResponseSnapshotInit;
          status: number;
          streaming: false;
      }
      • Readonlybody: Uint8Array | string | null
      • Readonlyheaders: Headers
      • Optional Readonly InternalresponseInit?: ResponseSnapshotInit

        Snapshot-local header input the runtime may pass to a native response before it reads the lazy headers view.

      • Readonlystatus: number
      • Readonlystreaming: false
    • {
          body: ReadableStream<Uint8Array>;
          headers: Headers;
          responseInit?: ResponseSnapshotInit;
          status: number;
          streaming: true;
      }
      • Readonlybody: ReadableStream<Uint8Array>
      • Readonlyheaders: Headers
      • Optional Readonly InternalresponseInit?: ResponseSnapshotInit

        Snapshot-local header input the runtime may pass to a native response before it reads the lazy headers view.

      • Readonlystatus: number
      • Readonlystreaming: true

    0.2.0