import type { Event } from '@difizen/mana-common'; import { Syringe } from '../core'; export type Option = { /** * collected from the parent containers */ recursive?: boolean; /** * use cache */ cache?: boolean; }; export type Provider> = { getContributions: (option?: Option) => T[]; onChanged: Event; }; export const Provider = Syringe.defineToken('SyringeContributionProvider', { global: true, }); class ContributionOptionConfigImpl { recursive = false; cache = true; } export const ContributionOptionConfig = new ContributionOptionConfigImpl();