UNPKG

jodit-pro

Version:

PRO Version of Jodit Editor

27 lines (26 loc) 770 B
/** * Base class for UI lists that use reconciliation */ import type { IReconcileOptions } from "./list-reconciler"; /** * Helper class for managing reconcilable UI elements */ export declare abstract class ReconcilableUIList<T = any> { protected items: T[]; /** * Update list with new items using reconciliation */ updateItems(newItems: T[], options: IReconcileOptions<T>): void; /** * Override to handle item creation */ protected abstract createItem(item: T, index: number): void; /** * Override to handle item updates */ protected abstract updateItem(oldItem: T, newItem: T, index: number): void; /** * Override to handle item removal */ protected abstract removeItem(item: T): void; }