UNPKG

@cute-dw/core

Version:

This TypeScript library is the main part of a more powerfull package designed for the fast WEB software development. The cornerstone of the library is the **DataStore** class, which might be useful when you need a full control of the data, but do not need

18 lines (17 loc) 821 B
import { Consumer } from "../util/function/Consumer"; import { Element } from "./Collection"; /** * Implementing this interface allows an object to be the target of the enhanced _for-of_ statement. * Redefines TypeScript's native implementation to adhere to the `Java Collections Framework` interface. */ export interface Iterable<T> { /** Returns the default iterator over elements of type T */ [Symbol.iterator](): Iterator<Element<T>>; /** Returns an iterator over elements of type T */ get iterator(): Iterator<Element<T>>; /** * Performs the `Consumer` action for each element of the iterable object until all elements have been processed or the action throws an exception * @param action Action to perform */ forEach(action: Consumer<Element<T>>): void; }