Documentation
    Preparing search index...

    Function createLazyHandler

    • import type { Container } from '@chubbyts/chubbyts-dic-types/dist/container';
      import { createContainer } from '@chubbyts/chubbyts-dic/dist/container';
      import type { Handler } from '@chubbyts/chubbyts-http-types/dist/handler';
      import type { Logger } from 'some-logger/dist/logger';
      import { createLazyHandler } from '@chubbyts/chubbyts-framework/dist/handler/lazy-handler';

      const container: Container = createContainer();

      container.set('handlerServiceId', (container: Container): Handler => {
      return createMyHandler(container.get<Logger>('logger'));
      });

      const handler: Handler = createLazyHandler(container, 'handlerServiceId');

      Parameters

      • container: Container
      • id: string

      Returns Handler