odavid / typeorm-transactional-cls-hooked

A Transactional Method Decorator for typeorm that uses cls-hooked to handle and propagate transactions between different repositories and service methods. Inpired by Spring Trasnactional Annotation and Sequelize CLS
MIT License
524 stars 86 forks source link

library architecture #19

Closed NarHakobyan closed 5 years ago

NarHakobyan commented 5 years ago

please remove types from dist folder, if we are not importing from dist types are not working

image

image

odavid commented 5 years ago

You should not import from dist... You should import from typeorm-transactional-cls-hooked

import { initializeTransactionalContext, patchTypeORMRepositoryWithBaseRepository } from 'typeorm-transactional-cls-hooked';
NarHakobyan commented 5 years ago

In that case typings autocomplete is not working

odavid commented 5 years ago

It should work, will investigate.

odavid commented 5 years ago

@NarHakobyan - I just created a simple typescript project

intellisense works image

Am I missing something?

NarHakobyan commented 5 years ago

image image

also, webstorm autoimport imports from dist

odavid commented 5 years ago

Hi @NarHakobyan - Added types to package.json, I believe it will solve the issue.

Will release soon.

Closing it, please reopen if the new release won't work.

Cheers, Ohad