import { LookUpStrategy } from '../Registries/Constants'; import { TDestroyable, TRegistrable } from '../../Mixins'; import { TAbstractSimpleRegistry } from './TAbstractSimpleRegistry'; export type TAbstractEntityRegistry = Omit, 'add' | 'replace' | 'remove' | 'findByKey' | 'getByKey'> & Readonly<{ add: (entity: T) => void; asObject: () => Record; find: (predicate: (value: T, key: string) => boolean) => T | undefined; findAllByTag: (tag: string) => ReadonlyArray; findAllByTags: (tags: ReadonlyArray, strategy: LookUpStrategy) => ReadonlyArray; findAllWithNames: (names: ReadonlyArray) => ReadonlyArray; findById: (id: string) => T | undefined; findByName: (name: string) => T | undefined; findByTag: (tag: string) => T | undefined | never; findByTags: (tags: ReadonlyArray, strategy: LookUpStrategy) => T | undefined | never; get: (predicate: (value: T, key: string) => boolean) => T | never; getById: (id: string) => T | never; getByName: (name: string) => T | never; getByTag: (tag: string) => T | never; getByTags: (tags: ReadonlyArray, strategy: LookUpStrategy) => T | never; remove: (id: string) => void; replace: (entity: T) => void; }> & TDestroyable;