MockCollection interface

Module @runic-artifex/views/mock in @runic-artifex/views 0.23.0

interface MockCollection<TItem = unknown>

Edits one keyed collection of a mock View and pushes each edit as a frame with indexed changes, like a producer's keyed collection. Inside MockView.batch the edits share one frame.

Properties

items

readonly items: readonly TItem[];

No documentation.

keys

readonly keys: readonly string[];

No documentation.

Methods

add

add(items: TItem | readonly TItem[], index?: number): void;

Inserts rows at index, by default at the end.

remove

remove(key: string): void;

No documentation.

replace

replace(key: string, item: TItem): void;

No documentation.

move

move(key: string, index: number): void;

No documentation.