UNPKG

tiny-bin

Version:

A library for building tiny and beautiful command line apps.

17 lines (16 loc) 411 B
import Addon from './addon.js'; declare class Collection<T extends { ids: string[]; }> extends Addon { private list; private map; getAll(): readonly T[]; getById(id: string): T | undefined; getByIdOrFail(id: string): T; getByIds(ids: string[]): { id: string; value: T; } | undefined; register(value: T, override?: boolean): void; } export default Collection;