import type { NonEmptyArray } from "@webiny/api/types.js"; export interface IRegistryRegisterParams { item: T; app: string; tags: NonEmptyArray; } export interface IRegistryItem { item: T; app: string; tags: NonEmptyArray; } export interface IRegistry { register(params: IRegistryRegisterParams): void; /** * Throws an error if more than one item is found or there is no item found. */ getOneItem(cb: (item: IRegistryItem) => boolean): IRegistryItem; /** * Throws an error if more than one item is found. */ getItem(cb: (item: IRegistryItem) => boolean): IRegistryItem | null; getItems(cb: (item: IRegistryItem) => boolean): IRegistryItem[]; } export * from "./store/types.js";