UNPKG

enso

Version:

Maximalist state & form management library for React

20 lines 1.03 kB
import { DetachedValue } from "../../../detached/index.ts"; import type { AtomImpl } from "../../implementation.ts"; import { AtomInternal } from "../base/index.ts"; export declare abstract class AtomInternalCollection<Value> extends AtomInternal<Value> { abstract get size(): number; abstract remove(key: keyof Value): AtomImpl<DetachedValue>; abstract forEach(callback: AtomInternalCollection.Callback<Value>): void; abstract map<Result>(callback: AtomInternalCollection.Callback<Value, Result>): Result[]; abstract find(predicate: AtomInternalCollection.Predicate<Value>): AtomImpl<unknown> | undefined; abstract filter(predicate: AtomInternalCollection.Predicate<Value>): AtomImpl<unknown>[]; } export declare namespace AtomInternalCollection { interface Callback<Value, Result = void> { (item: AtomImpl<unknown>, index: keyof Value): Result; } interface Predicate<Value> { (item: AtomImpl<unknown>, index: keyof Value): boolean; } } //# sourceMappingURL=index.d.ts.map