UNPKG

@triviality/core

Version:
37 lines (36 loc) 1.13 kB
import { TaggedServiceFactoryReference } from './TaggedServiceFactoryReference'; import { BaseServiceFactoryReference } from './BaseServiceFactoryReference'; /** * For internal service function reference. * * @example * const example: FF = ({reference}) => { * const myService = reference(() => 'foo string service'); * return { * first: myService, * second: myService, * }; * }; * * // First and second are proxies of the internal service. * // Reference function is an example, many internal function are pre wrapped as a * // reference. */ export declare class InternalServiceFactoryReference extends BaseServiceFactoryReference { readonly type = "internal"; private proxies; /** * i = The internal dependency * s = The actual service * p = The dependency in the middle * * a -> i -> s * b -> i -> s * * a -> i -> p -> s * b -> i -> p -> s */ addReferenceProxy(proxy: TaggedServiceFactoryReference): void; getReferenceProxies(): TaggedServiceFactoryReference[]; label(): string; }