typedorm icon indicating copy to clipboard operation
typedorm copied to clipboard

UpdateBody type is not usably exported for some use cases

Open dls314 opened this issue 2 years ago • 0 comments

Hi,

When trying to use the UpdateBody type (from https://github.com/typedorm/typedorm/blob/main/packages/core/src/classes/expression/update-body-type.ts#L98-L112) in a TS project with tsconfig settings that include

    "module": "node16",
    "moduleResolution": "node16",

I get seemingly unresolvable import errors because those module and moduleResolution types imply the resolvePackagejsonExports (https://www.typescriptlang.org/tsconfig#resolvePackageJsonExports) which seems not to allow a submodule import like the following

import { UpdateBody } from '@typedorm/core/esm/src/classes/expression/update-body-type';

The submodule import being necessary, because the UpdateBody type is not included in the public or private API exports from TypeDorm, even though it's referenced by the EntityManager public API.

dls314 avatar Mar 15 '24 13:03 dls314