cytoplasmic
    Preparing search index...

    Interface CellIterable<TValue, TKey>

    Common interface for data structures that can be passed to For.

    interface CellIterable<TValue, TKey> {
        observe(
            insert: (index: number, item: TValue, key: TKey) => void,
            remove: (index: number) => void,
        ): () => void;
    }

    Type Parameters

    • TValue
    • TKey

    Implemented by

    Index

    Methods

    Methods

    • Observe this iterable. Upon attaching an observer insert is called for each item currently contained in the underlying collection.

      Parameters

      • insert: (index: number, item: TValue, key: TKey) => void

        An observer that is called whenever an item is inserted.

      • remove: (index: number) => void

        An observer that is called whenever an item is removed.

      Returns () => void

      A function that should be called to detach the observer functions.