Function diInit

Entry point for almost all ts-fp-di API

Should be called on each HTTP request, MQ message handling, cron job or just in test

diInit(() => {
// ts-fp-di API usage here
// or call `next` function of middleware here
})
  • Type Parameters

    • T

    Parameters

    • cb: (() => T)
        • (): T
        • Returns T

    Returns T