import { ComponentId } from '../annotation/component'; import { Container } from '../container'; import { Prioritizeable } from '../utils/prioritizeable'; export declare const ProviderCreator: unique symbol; export declare const ComponentFilter: unique symbol; export declare const ComponentFilterRegistry: unique symbol; export declare const ComponentFilterContribution: unique symbol; export interface Provider { get(recursive?: boolean): T[]; sortSync(getPriority?: Prioritizeable.GetPrioritySync, recursive?: boolean): T[]; sort(getPriority?: Prioritizeable.GetPriority, recursive?: boolean): Promise; } export interface ProviderCreator { create(id: ComponentId, container: Container): Provider; } /** * @param toTest Object that should be tested * @returns `true` if the object passes the test, `false` otherwise. */ export declare type ComponentFilter = (toTest: T) => boolean; export declare type ComponentType = ComponentId; export interface ComponentFilterRegistry { /** * Add filters to be applied for every type of component. */ addFilters(types: '*', filters: ComponentFilter[]): void; /** * Given a list of component types, register filters to apply. * @param types types for which to register the filters. */ addFilters(types: ComponentType[], filters: ComponentFilter[]): void; /** * Applies the filters for the given component type. Generic filters will be applied on any given type. * @param toFilter the elements to filter * @param type the component type for which potentially filters were registered * @returns the filtered elements */ applyFilters(toFilter: T[], type: ComponentType): T[]; } /** * Register filters to remove contributions. */ export interface ComponentFilterContribution { /** * Use the registry to register your contribution filters. */ registerContributionFilters(registry: ComponentFilterRegistry): void; } //# sourceMappingURL=provider-protocol.d.ts.map