export type OrderedMapping = TData & { order?: number; }; /** * OrderedMappings is an abstract class that manages a collection of ordered mappings, * where each mapping has a specific order and associated data. * * @exports */ export declare abstract class OrderedMappings { protected _mappings: OrderedMapping[]; constructor(); /** * Adds a new mapping to the collection, automatically assigning an order if not provided ( defaults to the next available index). * @param mapping */ add(mapping: OrderedMapping): void; /** * Resets the collection by removing all existing mappings. */ clear(): void; /** * The mappings length * @returns The length */ get length(): number; } /** * Used to comapre elements in an ordered mapping * * @exports * * @param a The first element * @param b The second element * @returns The comparison result */ export declare function byOrder(a: OrderedMapping, b: OrderedMapping): number;