@lyonbot/interactive-blocks
Version:
Make interactive selectable, drag-and-drop, copy-and-paste ready, Block and Slot components easily! Works with Vue, React and any MV* framework.
5 lines (4 loc) • 425 B
TypeScript
export declare type Predicate<T> = (value: T, index: number) => boolean;
export declare function find<T>(iterator: Iterable<T> | null | undefined, predicate: Predicate<T>): T | undefined;
export declare function reduce<T, U>(iterator: Iterable<T> | null | undefined, initial: U, reducer: (agg: U, item: T, index: number) => U): U;
export declare function head<T>(iterator: Iterable<T> | null | undefined): T | undefined;