UNPKG

reblendjs

Version:

This is build using react way of handling dom but with web components

20 lines (19 loc) 772 B
export declare class DiffUtil { /** * Deeply flattens an array or set of elements. * * @template T * @param {T[] | Set<T>} data - The data to flatten. * @returns {T[]} A flattened array of elements. */ static deepFlat<T>(data: T[] | Set<T>): T[]; /** * Flattens a nested array or set of virtual nodes (VNode) and adds the result to the `containerArr`. * * @template T * @param {(T | T[])[] | Set<T | T[]>} arr - The array or set of VNode children to flatten. * @param {T[]} [containerArr=[]] - The container array to store flattened nodes. * @returns {T[]} The flattened array of VNode children. */ static flattenVNodeChildren<T>(arr: (T | T[])[] | Set<T | T[]>, containerArr?: T[]): T[]; }