Options
All
  • Public
  • Public/Protected
  • All
Menu

Module core

Machinat Core

This is the core module of Machinat framework.

Install

npm install @machinat/core
# or with yarn
yarn add @machinat/core

Docs

Check the framework documents and the package references.

Index

Other

Renames and re-exports default
Renames and re-exports default
Renames and re-exports default
Re-exports MachinatProfile
Renames and re-exports default
Renames and re-exports default
AnyEventContext: EventContext<any, any, any>
AnyMachinatPlatform: MachinatPlatform<any, unknown, unknown, any, unknown>
AppConfig<Platform>: { modules?: ServiceModule[]; platforms?: Platform[]; services?: ServiceProvision<unknown>[] }

Type parameters

Type declaration

ContainerComponent<Props>: ServiceContainer<ContainerComponentFn<Props>, unknown[]>

Type parameters

  • Props

ContainerElement<Props, Component>: MachinatElement<Props, Component>

Type parameters

DispatchFn<Job, Frame, Result>: (frame: Frame, scope?: ServiceScope) => Promise<DispatchResponse<Job, Result>>

Type parameters

Type declaration

DispatchMiddleware<Job, Frame, Result>: Middleware<Frame, DispatchResponse<Job, Result>>

Type parameters

DispatchWrapper<Job, Frame, Result>: (dispatch: (frame: Frame) => Promise<DispatchResponse<Job, Result>>) => DispatchFn<Job, Frame, Result>

Type parameters

Type declaration

EventContext<Event, Metadata, Bot>: { bot: Bot; event: Event; metadata: Metadata; platform: string; reply: any }

Type parameters

Type declaration

EventContextOfPlatform<Platform>: Platform extends MachinatPlatform<infer Context, unknown, unknown, any, unknown> ? Context : never

Type parameters

EventMiddleware<Context, Response>: Middleware<Context, Response>

Type parameters

FragmentElement: MachinatElement<FragmentProps, typeof MACHINAT_FRAGMENT_TYPE>
FragmentProps: { children: MachinatNode }

Type declaration

FunctionalComponent<Props>: (props: Props, circs: RenderEnv) => MachinatElement<unknown, unknown>

Type parameters

  • Props

Type declaration

FunctionalElement<Props, Component>: MachinatElement<Props, Component>

Type parameters

GeneralElement: MachinatElement<{}, string>
InitScopeFn: () => ServiceScope

Type declaration

MachinatElement<P, T>: { $$typeof: typeof MACHINAT_ELEMENT_TYPE; props: P; type: T }

Type parameters

  • P

  • T

Type declaration

  • $$typeof: typeof MACHINAT_ELEMENT_TYPE
  • props: P
  • type: T
MachinatElementType: string | FunctionalComponent<unknown> | ContainerComponent<unknown> | NativeComponent<unknown, any> | typeof MACHINAT_FRAGMENT_TYPE | typeof MACHINAT_PAUSE_TYPE | typeof MACHINAT_PROVIDER_TYPE | typeof MACHINAT_THUNK_TYPE | typeof MACHINAT_RAW_TYPE
MachinatEmpty: null | undefined | boolean
MachinatPlatform<Context, EventResp, Job, Frame, Result>: { dispatchMiddlewares?: MaybeContainer<DispatchMiddleware<Job, Frame, Result>>[]; eventMiddlewares?: MaybeContainer<EventMiddleware<Context, EventResp>>[]; name: string; provisions: ServiceProvision<unknown>[]; startHook?: ServiceContainer<Promise<void>, unknown[]>; stopHook?: null | ServiceContainer<Promise<void>, unknown[]>; utilitiesInterface: ServiceInterface<PlatformUtilities<Context, EventResp, Job, Frame, Result>> }

Type parameters

Type declaration

MachinatText: string | number
Middleware<Input, Output>: (input: Input, next: (input: Input) => Promise<Output>) => Promise<Output>

Type parameters

  • Input

  • Output

Type declaration

    • (input: Input, next: (input: Input) => Promise<Output>): Promise<Output>
    • Parameters

      • input: Input
      • next: (input: Input) => Promise<Output>
          • (input: Input): Promise<Output>
          • Parameters

            • input: Input

            Returns Promise<Output>

      Returns Promise<Output>

ModuleUtilities: { initScope: InitScopeFn; popError: PopErrorFn }

Type declaration

NativeComponent<Props, Segment>: { $$platform: string; $$typeof: typeof MACHINAT_NATIVE_TYPE }

Type parameters

Type declaration

NativeElement<Props, Component>: MachinatElement<Props, Component>

Type parameters

PauseDelayFn: () => Promise<unknown>

Type declaration

    • (): Promise<unknown>
    • Returns Promise<unknown>

PauseElement: MachinatElement<PauseProps, typeof MACHINAT_PAUSE_TYPE>
PauseProps: { delay?: PauseDelayFn; time?: number }

Type declaration

PlatformUtilities<Context, EventResponse, Job, Frame, Result>: { dispatchWrapper: DispatchWrapper<Job, Frame, Result>; popEventWrapper: PopEventWrapper<Context, EventResponse> }

Type parameters

Type declaration

PopErrorFn: (err: Error, scope?: ServiceScope) => void

Type declaration

PopEventFn<Context, Response>: (context: Context, scope?: ServiceScope) => Promise<Response>

Type parameters

Type declaration

    • Parameters

      Returns Promise<Response>

PopEventWrapper<Context, Response>: (finalHandler: (ctx: Context) => Promise<Response>) => PopEventFn<Context, Response>

Type parameters

Type declaration

    • (finalHandler: (ctx: Context) => Promise<Response>): PopEventFn<Context, Response>
    • Parameters

      • finalHandler: (ctx: Context) => Promise<Response>
          • (ctx: Context): Promise<Response>
          • Parameters

            • ctx: Context

            Returns Promise<Response>

      Returns PopEventFn<Context, Response>

ProviderElement: MachinatElement<ProviderProps, typeof MACHINAT_PROVIDER_TYPE>
ProviderProps: { children: MachinatNode; provide: Interfaceable<unknown>; value: unknown }

Type declaration

RawElement: MachinatElement<RawProps, typeof MACHINAT_RAW_TYPE>
RawProps: { value: unknown }

Type declaration

  • value: unknown
RenderingChannel: null | MachinatChannel
ServiceModule: { provisions: ServiceProvision<unknown>[]; startHook?: null | ServiceContainer<Promise<void>, unknown[]>; stopHook?: null | ServiceContainer<Promise<void>, unknown[]> }

Type declaration

ThunkEffectFn: () => unknown | Promise<unknown>

Type declaration

    • (): unknown | Promise<unknown>
    • Returns unknown | Promise<unknown>

ThunkElement: MachinatElement<ThunkProps, typeof MACHINAT_THUNK_TYPE>
ThunkProps: { effect: ThunkEffectFn }

Type declaration

Service Registry

  • makeClassProvider<_T, A>(opts: ClassProviderOptions<_T, [A]>): <T, Klazz>(klazz: Klazz & Constructor<T>) => ServiceProvider<T, ResolveDependencies<[A]>> & Klazz
  • makeClassProvider<_T, A, B>(opts: ClassProviderOptions<_T, [A, B]>): <T, Klazz>(klazz: Klazz & Constructor<T>) => ServiceProvider<T, ResolveDependencies<[A, B]>> & Klazz
  • makeClassProvider<_T, A, B, C>(opts: ClassProviderOptions<_T, [A, B, C]>): <T, Klazz>(klazz: Klazz & Constructor<T>) => ServiceProvider<T, ResolveDependencies<[A, B, C]>> & Klazz
  • makeClassProvider<_T, A, B, C, D>(opts: ClassProviderOptions<_T, [A, B, C, D]>): <T, Klazz>(klazz: Klazz & Constructor<T>) => ServiceProvider<T, ResolveDependencies<[A, B, C, D]>> & Klazz
  • makeClassProvider<_T, A, B, C, D, E>(opts: ClassProviderOptions<_T, [A, B, C, D, E]>): <T, Klazz>(klazz: Klazz & Constructor<T>) => ServiceProvider<T, ResolveDependencies<[A, B, C, D, E]>> & Klazz
  • makeClassProvider<_T, A, B, C, D, E, F>(opts: ClassProviderOptions<_T, [A, B, C, D, E, F]>): <T, Klazz>(klazz: Klazz & Constructor<T>) => ServiceProvider<T, ResolveDependencies<[A, B, C, D, E, F]>> & Klazz
  • makeClassProvider<_T, A, B, C, D, E, F, G>(opts: ClassProviderOptions<_T, [A, B, C, D, E, F, G]>): <T, Klazz>(klazz: Klazz & Constructor<T>) => ServiceProvider<T, ResolveDependencies<[A, B, C, D, E, F, G]>> & Klazz
  • makeClassProvider<_T, A, B, C, D, E, F, G, H>(opts: ClassProviderOptions<_T, [A, B, C, D, E, F, G, H]>): <T, Klazz>(klazz: Klazz & Constructor<T>) => ServiceProvider<T, ResolveDependencies<[A, B, C, D, E, F, G, H]>> & Klazz
  • makeClassProvider<_T, A, B, C, D, E, F, G, H, I>(opts: ClassProviderOptions<_T, [A, B, C, D, E, F, G, H, I]>): <T, Klazz>(klazz: Klazz & Constructor<T>) => ServiceProvider<T, ResolveDependencies<[A, B, C, D, E, F, G, H, I]>> & Klazz
  • makeClassProvider<_T, A, B, C, D, E, F, G, H, I, J>(opts: ClassProviderOptions<_T, [A, B, C, D, E, F, G, H, I, J]>): <T, Klazz>(klazz: Klazz & Constructor<T>) => ServiceProvider<T, ResolveDependencies<[A, B, C, D, E, F, G, H, I, J]>> & Klazz
  • makeContainer<A>(opts: ContainerOptions<[A]>): <T>(fn: FactoryFn<T, [A]>) => ContainerFn<T, [A]>
  • makeContainer<A, B>(opts: ContainerOptions<[A, B]>): <T>(fn: FactoryFn<T, [A, B]>) => ContainerFn<T, [A, B]>
  • makeContainer<A, B, C>(opts: ContainerOptions<[A, B, C]>): <T>(fn: FactoryFn<T, [A, B, C]>) => ContainerFn<T, [A, B, C]>
  • makeContainer<A, B, C, D>(opts: ContainerOptions<[A, B, C, D]>): <T>(fn: FactoryFn<T, [A, B, C, D]>) => ContainerFn<T, [A, B, C, D]>
  • makeContainer<A, B, C, D, E>(opts: ContainerOptions<[A, B, C, D, E]>): <T>(fn: FactoryFn<T, [A, B, C, D, E]>) => ContainerFn<T, [A, B, C, D, E]>
  • makeContainer<A, B, C, D, E, F>(opts: ContainerOptions<[A, B, C, D, E, F]>): <T>(fn: FactoryFn<T, [A, B, C, D, E, F]>) => ContainerFn<T, [A, B, C, D, E, F]>
  • makeContainer<A, B, C, D, E, F, G>(opts: ContainerOptions<[A, B, C, D, E, F, G]>): <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G]>) => ContainerFn<T, [A, B, C, D, E, F, G]>
  • makeContainer<A, B, C, D, E, F, G, H>(opts: ContainerOptions<[A, B, C, D, E, F, G, H]>): <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G, H]>) => ContainerFn<T, [A, B, C, D, E, F, G, H]>
  • makeContainer<A, B, C, D, E, F, G, H, I>(opts: ContainerOptions<[A, B, C, D, E, F, G, H, I]>): <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G, H, I]>) => ContainerFn<T, [A, B, C, D, E, F, G, H, I]>
  • makeContainer<A, B, C, D, E, F, G, H, I, J>(opts: ContainerOptions<[A, B, C, D, E, F, G, H, I, J]>): <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G, H, I, J]>) => ContainerFn<T, [A, B, C, D, E, F, G, H, I, J]>
  • makeContainer marks a function as a container and annotate the dependencies.

    Type parameters

    • A: AnyDep

    Parameters

    • opts: ContainerOptions<[A]>

    Returns <T>(fn: FactoryFn<T, [A]>) => ContainerFn<T, [A]>

      • <T>(fn: FactoryFn<T, [A]>): ContainerFn<T, [A]>
      • Type parameters

        • T

        Parameters

        • fn: FactoryFn<T, [A]>

        Returns ContainerFn<T, [A]>

  • makeContainer marks a function as a container and annotate the dependencies.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    Parameters

    • opts: ContainerOptions<[A, B]>

    Returns <T>(fn: FactoryFn<T, [A, B]>) => ContainerFn<T, [A, B]>

      • <T>(fn: FactoryFn<T, [A, B]>): ContainerFn<T, [A, B]>
      • Type parameters

        • T

        Parameters

        • fn: FactoryFn<T, [A, B]>

        Returns ContainerFn<T, [A, B]>

  • makeContainer marks a function as a container and annotate the dependencies.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    Parameters

    • opts: ContainerOptions<[A, B, C]>

    Returns <T>(fn: FactoryFn<T, [A, B, C]>) => ContainerFn<T, [A, B, C]>

      • <T>(fn: FactoryFn<T, [A, B, C]>): ContainerFn<T, [A, B, C]>
      • Type parameters

        • T

        Parameters

        • fn: FactoryFn<T, [A, B, C]>

        Returns ContainerFn<T, [A, B, C]>

  • makeContainer marks a function as a container and annotate the dependencies.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    Parameters

    • opts: ContainerOptions<[A, B, C, D]>

    Returns <T>(fn: FactoryFn<T, [A, B, C, D]>) => ContainerFn<T, [A, B, C, D]>

      • <T>(fn: FactoryFn<T, [A, B, C, D]>): ContainerFn<T, [A, B, C, D]>
      • Type parameters

        • T

        Parameters

        • fn: FactoryFn<T, [A, B, C, D]>

        Returns ContainerFn<T, [A, B, C, D]>

  • makeContainer marks a function as a container and annotate the dependencies.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    Parameters

    • opts: ContainerOptions<[A, B, C, D, E]>

    Returns <T>(fn: FactoryFn<T, [A, B, C, D, E]>) => ContainerFn<T, [A, B, C, D, E]>

      • <T>(fn: FactoryFn<T, [A, B, C, D, E]>): ContainerFn<T, [A, B, C, D, E]>
      • Type parameters

        • T

        Parameters

        • fn: FactoryFn<T, [A, B, C, D, E]>

        Returns ContainerFn<T, [A, B, C, D, E]>

  • makeContainer marks a function as a container and annotate the dependencies.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    • F: AnyDep

    Parameters

    • opts: ContainerOptions<[A, B, C, D, E, F]>

    Returns <T>(fn: FactoryFn<T, [A, B, C, D, E, F]>) => ContainerFn<T, [A, B, C, D, E, F]>

      • <T>(fn: FactoryFn<T, [A, B, C, D, E, F]>): ContainerFn<T, [A, B, C, D, E, F]>
      • Type parameters

        • T

        Parameters

        • fn: FactoryFn<T, [A, B, C, D, E, F]>

        Returns ContainerFn<T, [A, B, C, D, E, F]>

  • makeContainer marks a function as a container and annotate the dependencies.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    • F: AnyDep

    • G: AnyDep

    Parameters

    • opts: ContainerOptions<[A, B, C, D, E, F, G]>

    Returns <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G]>) => ContainerFn<T, [A, B, C, D, E, F, G]>

      • <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G]>): ContainerFn<T, [A, B, C, D, E, F, G]>
      • Type parameters

        • T

        Parameters

        • fn: FactoryFn<T, [A, B, C, D, E, F, G]>

        Returns ContainerFn<T, [A, B, C, D, E, F, G]>

  • makeContainer marks a function as a container and annotate the dependencies.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    • F: AnyDep

    • G: AnyDep

    • H: AnyDep

    Parameters

    • opts: ContainerOptions<[A, B, C, D, E, F, G, H]>

    Returns <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G, H]>) => ContainerFn<T, [A, B, C, D, E, F, G, H]>

      • <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G, H]>): ContainerFn<T, [A, B, C, D, E, F, G, H]>
      • Type parameters

        • T

        Parameters

        • fn: FactoryFn<T, [A, B, C, D, E, F, G, H]>

        Returns ContainerFn<T, [A, B, C, D, E, F, G, H]>

  • makeContainer marks a function as a container and annotate the dependencies.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    • F: AnyDep

    • G: AnyDep

    • H: AnyDep

    • I: AnyDep

    Parameters

    • opts: ContainerOptions<[A, B, C, D, E, F, G, H, I]>

    Returns <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G, H, I]>) => ContainerFn<T, [A, B, C, D, E, F, G, H, I]>

      • <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G, H, I]>): ContainerFn<T, [A, B, C, D, E, F, G, H, I]>
      • Type parameters

        • T

        Parameters

        • fn: FactoryFn<T, [A, B, C, D, E, F, G, H, I]>

        Returns ContainerFn<T, [A, B, C, D, E, F, G, H, I]>

  • makeContainer marks a function as a container and annotate the dependencies.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    • F: AnyDep

    • G: AnyDep

    • H: AnyDep

    • I: AnyDep

    • J: AnyDep

    Parameters

    • opts: ContainerOptions<[A, B, C, D, E, F, G, H, I, J]>

    Returns <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G, H, I, J]>) => ContainerFn<T, [A, B, C, D, E, F, G, H, I, J]>

      • <T>(fn: FactoryFn<T, [A, B, C, D, E, F, G, H, I, J]>): ContainerFn<T, [A, B, C, D, E, F, G, H, I, J]>
      • Type parameters

        • T

        Parameters

        • fn: FactoryFn<T, [A, B, C, D, E, F, G, H, I, J]>

        Returns ContainerFn<T, [A, B, C, D, E, F, G, H, I, J]>

  • makeFactoryProvider<A>(opts: FactoryProviderOptions<[A]>): <T>(factory: FactoryFn<T, [A]>) => ProviderFn<T, [A]>
  • makeFactoryProvider<A, B>(opts: FactoryProviderOptions<[A, B]>): <T>(factory: FactoryFn<T, [A, B]>) => ProviderFn<T, [A, B]>
  • makeFactoryProvider<A, B, C>(opts: FactoryProviderOptions<[A, B, C]>): <T>(factory: FactoryFn<T, [A, B, C]>) => ProviderFn<T, [A, B, C]>
  • makeFactoryProvider<A, B, C, D>(opts: FactoryProviderOptions<[A, B, C, D]>): <T>(factory: FactoryFn<T, [A, B, C, D]>) => ProviderFn<T, [A, B, C, D]>
  • makeFactoryProvider<A, B, C, D, E>(opts: FactoryProviderOptions<[A, B, C, D, E]>): <T>(factory: FactoryFn<T, [A, B, C, D, E]>) => ProviderFn<T, [A, B, C, D, E]>
  • makeFactoryProvider<A, B, C, D, E, F>(opts: FactoryProviderOptions<[A, B, C, D, E, F]>): <T>(factory: FactoryFn<T, [A, B, C, D, E, F]>) => ServiceProvider<T, [A, B, C, D, E, F]>
  • makeFactoryProvider<A, B, C, D, E, F, G>(opts: FactoryProviderOptions<[A, B, C, D, E, F, G]>): <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G]>) => ProviderFn<T, [A, B, C, D, E, F, G]>
  • makeFactoryProvider<A, B, C, D, E, F, G, H>(opts: FactoryProviderOptions<[A, B, C, D, E, F, G, H]>): <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G, H]>) => ProviderFn<T, [A, B, C, D, E, F, G, H]>
  • makeFactoryProvider<A, B, C, D, E, F, G, H, I>(opts: FactoryProviderOptions<[A, B, C, D, E, F, G, H, I]>): <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G, H, I]>) => ProviderFn<T, [A, B, C, D, E, F, G, H, I]>
  • makeFactoryProvider<A, B, C, D, E, F, G, H, I, J>(opts: FactoryProviderOptions<[A, B, C, D, E, F, G, H, I, J]>): <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G, H, I, J]>) => ProviderFn<T, [A, B, C, D, E, F, G, H, I, J]>
  • makeFactoryProvider annotate a factory function as a provider serving for the instance type, and also an interface can be implemented.

    Type parameters

    • A: AnyDep

    Parameters

    • opts: FactoryProviderOptions<[A]>

    Returns <T>(factory: FactoryFn<T, [A]>) => ProviderFn<T, [A]>

      • <T>(factory: FactoryFn<T, [A]>): ProviderFn<T, [A]>
      • Type parameters

        • T

        Parameters

        • factory: FactoryFn<T, [A]>

        Returns ProviderFn<T, [A]>

  • makeFactoryProvider annotate a factory function as a provider serving for the instance type, and also an interface can be implemented.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    Parameters

    • opts: FactoryProviderOptions<[A, B]>

    Returns <T>(factory: FactoryFn<T, [A, B]>) => ProviderFn<T, [A, B]>

      • <T>(factory: FactoryFn<T, [A, B]>): ProviderFn<T, [A, B]>
      • Type parameters

        • T

        Parameters

        • factory: FactoryFn<T, [A, B]>

        Returns ProviderFn<T, [A, B]>

  • makeFactoryProvider annotate a factory function as a provider serving for the instance type, and also an interface can be implemented.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    Parameters

    • opts: FactoryProviderOptions<[A, B, C]>

    Returns <T>(factory: FactoryFn<T, [A, B, C]>) => ProviderFn<T, [A, B, C]>

      • <T>(factory: FactoryFn<T, [A, B, C]>): ProviderFn<T, [A, B, C]>
      • Type parameters

        • T

        Parameters

        • factory: FactoryFn<T, [A, B, C]>

        Returns ProviderFn<T, [A, B, C]>

  • makeFactoryProvider annotate a factory function as a provider serving for the instance type, and also an interface can be implemented.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    Parameters

    • opts: FactoryProviderOptions<[A, B, C, D]>

    Returns <T>(factory: FactoryFn<T, [A, B, C, D]>) => ProviderFn<T, [A, B, C, D]>

      • <T>(factory: FactoryFn<T, [A, B, C, D]>): ProviderFn<T, [A, B, C, D]>
      • Type parameters

        • T

        Parameters

        • factory: FactoryFn<T, [A, B, C, D]>

        Returns ProviderFn<T, [A, B, C, D]>

  • makeFactoryProvider annotate a factory function as a provider serving for the instance type, and also an interface can be implemented.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    Parameters

    • opts: FactoryProviderOptions<[A, B, C, D, E]>

    Returns <T>(factory: FactoryFn<T, [A, B, C, D, E]>) => ProviderFn<T, [A, B, C, D, E]>

      • <T>(factory: FactoryFn<T, [A, B, C, D, E]>): ProviderFn<T, [A, B, C, D, E]>
      • Type parameters

        • T

        Parameters

        • factory: FactoryFn<T, [A, B, C, D, E]>

        Returns ProviderFn<T, [A, B, C, D, E]>

  • makeFactoryProvider annotate a factory function as a provider serving for the instance type, and also an interface can be implemented.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    • F: AnyDep

    Parameters

    • opts: FactoryProviderOptions<[A, B, C, D, E, F]>

    Returns <T>(factory: FactoryFn<T, [A, B, C, D, E, F]>) => ServiceProvider<T, [A, B, C, D, E, F]>

      • <T>(factory: FactoryFn<T, [A, B, C, D, E, F]>): ServiceProvider<T, [A, B, C, D, E, F]>
      • Type parameters

        • T

        Parameters

        • factory: FactoryFn<T, [A, B, C, D, E, F]>

        Returns ServiceProvider<T, [A, B, C, D, E, F]>

  • makeFactoryProvider annotate a factory function as a provider serving for the instance type, and also an interface can be implemented.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    • F: AnyDep

    • G: AnyDep

    Parameters

    • opts: FactoryProviderOptions<[A, B, C, D, E, F, G]>

    Returns <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G]>) => ProviderFn<T, [A, B, C, D, E, F, G]>

      • <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G]>): ProviderFn<T, [A, B, C, D, E, F, G]>
      • Type parameters

        • T

        Parameters

        • factory: FactoryFn<T, [A, B, C, D, E, F, G]>

        Returns ProviderFn<T, [A, B, C, D, E, F, G]>

  • makeFactoryProvider annotate a factory function as a provider serving for the instance type, and also an interface can be implemented.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    • F: AnyDep

    • G: AnyDep

    • H: AnyDep

    Parameters

    • opts: FactoryProviderOptions<[A, B, C, D, E, F, G, H]>

    Returns <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G, H]>) => ProviderFn<T, [A, B, C, D, E, F, G, H]>

      • <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G, H]>): ProviderFn<T, [A, B, C, D, E, F, G, H]>
      • Type parameters

        • T

        Parameters

        • factory: FactoryFn<T, [A, B, C, D, E, F, G, H]>

        Returns ProviderFn<T, [A, B, C, D, E, F, G, H]>

  • makeFactoryProvider annotate a factory function as a provider serving for the instance type, and also an interface can be implemented.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    • F: AnyDep

    • G: AnyDep

    • H: AnyDep

    • I: AnyDep

    Parameters

    • opts: FactoryProviderOptions<[A, B, C, D, E, F, G, H, I]>

    Returns <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G, H, I]>) => ProviderFn<T, [A, B, C, D, E, F, G, H, I]>

      • <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G, H, I]>): ProviderFn<T, [A, B, C, D, E, F, G, H, I]>
      • Type parameters

        • T

        Parameters

        • factory: FactoryFn<T, [A, B, C, D, E, F, G, H, I]>

        Returns ProviderFn<T, [A, B, C, D, E, F, G, H, I]>

  • makeFactoryProvider annotate a factory function as a provider serving for the instance type, and also an interface can be implemented.

    Type parameters

    • A: AnyDep

    • B: AnyDep

    • C: AnyDep

    • D: AnyDep

    • E: AnyDep

    • F: AnyDep

    • G: AnyDep

    • H: AnyDep

    • I: AnyDep

    • J: AnyDep

    Parameters

    • opts: FactoryProviderOptions<[A, B, C, D, E, F, G, H, I, J]>

    Returns <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G, H, I, J]>) => ProviderFn<T, [A, B, C, D, E, F, G, H, I, J]>

      • <T>(factory: FactoryFn<T, [A, B, C, D, E, F, G, H, I, J]>): ProviderFn<T, [A, B, C, D, E, F, G, H, I, J]>
      • Type parameters

        • T

        Parameters

        • factory: FactoryFn<T, [A, B, C, D, E, F, G, H, I, J]>

        Returns ProviderFn<T, [A, B, C, D, E, F, G, H, I, J]>

Generated using TypeDoc