It seems like getFactory requires a generic to be used, yet this is not documented.
Also, there is a second generic argument E, that is not used at all.
Is there a way to fix this so that the type of the factory class inferred from the argument?
// ↓ - this is mandatory, or factory
// becomes "any"
const foo = await factoryContainer.getFactory<UserFactory, any>(UserFactory).make()
// ↑ - this one is mandatory
// but isn't needed
It seems like
getFactory
requires a generic to be used, yet this is not documented.Also, there is a second generic argument
E
, that is not used at all.Is there a way to fix this so that the type of the factory class inferred from the argument?
https://github.com/adamdubicki/typeorm-entity-factory/blob/a739b3bdec974df33d409064675c553a9e175eb8/src/factory-container.ts#L58