import { Fn, Transceiver, TransceiverMode } from "atom.io/internal"; import { primitive } from "atom.io/foundations/json"; import { Subject } from "atom.io/foundations/subject"; import { Enumeration } from "atom.io/foundations/enumeration"; //#region src/transceivers/o-list/o-list.d.ts type ArrayMutations = Exclude, keyof ReadonlyArray>; type ArrayUpdate

= { type: `copyWithin`; target: number; start: number; end?: number; prev: readonly P[]; } | { type: `extend`; next: number; prev: number; } | { type: `fill`; value: P; start?: number; end?: number; prev: readonly P[]; } | { type: `pop` | `shift`; value?: P; } | { type: `push` | `unshift`; items: readonly P[]; } | { type: `reverse`; } | { type: `set`; next: P; prev?: P; index: number; } | { type: `sort`; next: readonly P[]; prev: readonly P[]; } | { type: `splice`; start: number; deleteCount: number; items: readonly P[]; deleted: readonly P[]; } | { type: `truncate`; length: number; items: readonly P[]; }; type OListUpdateType = ArrayUpdate[`type`]; type PackedArrayUpdate

= string & { update?: ArrayUpdate

; type?: P; }; declare const ARRAY_UPDATES: readonly ["set", "truncate", "extend", "pop", "push", "shift", "unshift", "copyWithin", "fill", "splice", "reverse", "sort"]; declare const ARRAY_UPDATE_ENUM: Enumeration; type ArrayMutationHandler = { [K in Exclude]: Fn; }; type OListView

= ReadonlyArray

& { subscribe: (key: string, fn: (update: PackedArrayUpdate

) => void) => () => void; }; declare class OList

extends Array

implements Transceiver, PackedArrayUpdate

, ReadonlyArray

>, ArrayMutationHandler { mode: TransceiverMode; readonly subject: Subject>; readonly READONLY_VIEW: OListView

; constructor(arrayLength?: number); constructor(...items: P[]); toJSON(): ReadonlyArray

; static fromJSON

(json: ReadonlyArray

): OList

; push(...items: P[]): number; pop(): P | undefined; shift(): P | undefined; unshift(...items: P[]): number; reverse(): this; fill(value: P, start?: number, end?: number): this; sort(compareFn?: (a: P, b: P) => number): this; splice(start: number, deleteCount?: number): P[]; splice(start: number, deleteCount: number, ...items: P[]): P[]; copyWithin(target: number, start: number, end?: number): this; subscribe(key: string, fn: (update: PackedArrayUpdate

) => void): () => void; emit(update: ArrayUpdate

): void; private doStep; do(update: PackedArrayUpdate

): null; undoStep(update: ArrayUpdate

): void; undo(update: PackedArrayUpdate

): number | null; static packUpdate

(update: ArrayUpdate

): PackedArrayUpdate

; static unpackUpdate

(packed: PackedArrayUpdate

): ArrayUpdate

; } //#endregion export { ARRAY_UPDATE_ENUM, ArrayMutationHandler, ArrayMutations, ArrayUpdate, OList, OListUpdateType, OListView, PackedArrayUpdate }; //# sourceMappingURL=index.d.ts.map