Skip to main content

Type Alias: ReadResult

ReadResult = { bytes: Uint8Array; kind: "bytes"; validator?: string; } | { kind: "not-found"; }

Defined in: types.ts:31

The outcome of a read. not-found is a distinct outcome rather than an error because a missing object is data for some formats (a missing Zarr chunk means its fill value) and an error for others (a missing COG).

Union Members​

Type Literal​

{ bytes: Uint8Array; kind: "bytes"; validator?: string; }

bytes​

bytes: Uint8Array

kind​

kind: "bytes"

validator?​

optional validator?: string

The ETag, or Last-Modified when there is none, of the response the bytes came from; absent when the server sent neither. A caller that parsed a file's structure can compare it across reads and fail when the object was replaced underneath it.


Type Literal​

{ kind: "not-found"; }