UNPKG

@difizen/mana-core

Version:

16 lines 742 B
import { Syringe } from '@difizen/mana-syringe'; import type { ManaModule } from '../module'; export type DataContextContriburtionKey = string | symbol; export declare const DataContextContriburtion: Syringe.DefinedToken; export interface DataContextContriburtion<T = any> { key: DataContextContriburtionKey; module: ManaModule; onCreate?: (ctx: Syringe.Context, options?: T) => void; getKey?: (ctx: Syringe.Context, options?: T) => any; } export declare const createDataContextContriburtion: (contribution: DataContextContriburtion) => { token: Syringe.DefinedToken; useValue: DataContextContriburtion<any>; }; export declare const DataContextSymbol: unique symbol; //# sourceMappingURL=data-context-protocol.d.ts.map