import type { Chunk, DataType, Scalar, TypedArray } from "../metadata.js"; export type Indices = [start: number, stop: number, step: number]; export interface Slice { start: number | null; stop: number | null; step: number | null; } export type Projection = { from: null; to: number; } | { from: number; to: null; } | { from: Indices; to: Indices; }; export type Prepare> = (data: TypedArray, shape: number[], stride: number[]) => NdArray; export type SetScalar> = (target: NdArray, selection: (Indices | number)[], value: Scalar) => void; export type SetFromChunk> = (a: NdArray, b: NdArray, proj: Projection[]) => void; export type Setter> = { prepare: Prepare; setFromChunk: SetFromChunk; setScalar: SetScalar; }; export type Options = { createQueue?: () => ChunkQueue; useSharedArrayBuffer?: boolean; signal?: AbortSignal; /** * @deprecated Pass `signal` directly on the options object. * Kept for one major version of back-compat; if both are set, the * signals are merged via `AbortSignal.any`. */ opts?: { signal?: AbortSignal; }; }; export type GetOptions = Options; export type SetOptions = Options; export type ChunkQueue = { add(fn: () => Promise): void; onIdle(): Promise>; }; //# sourceMappingURL=types.d.ts.map