You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating sequelize models as a shared lib for microservice-like backend architecture so the models can be imported over multiple repos. Our backend is coded with Typescript so I used sequelize-typescript to support TS in the shared model repo. Everything seems working well, but actually every sequelize types being used inside sequelize-typescript types are inferred to any in my microservice repos.
Expected behavior:
I would like to get all the shared functions and variables output with accurate sequelize types. I spent a couple days on this issue for investigation. Look microsoft/TypeScript#23918
import{Members}from'@xxx/models';
...
constmember=awaitMembers.findOne({where: {xx: xx}});// member is inferred to any. findOne function should be inferred to Promise<Member>.
Versions
I'm submitting a ...
[x] bug report
[ ] feature request
Actual behavior:
I am creating sequelize models as a shared lib for microservice-like backend architecture so the models can be imported over multiple repos. Our backend is coded with Typescript so I used sequelize-typescript to support TS in the shared model repo. Everything seems working well, but actually every sequelize types being used inside sequelize-typescript types are inferred to any in my microservice repos.
Expected behavior:
I would like to get all the shared functions and variables output with accurate sequelize types. I spent a couple days on this issue for investigation. Look microsoft/TypeScript#23918
Steps to reproduce:
Related code:
My shared model example:
How to use the model above in my backend repos:
Thank you for your help in advance @RobinBuschmann
The text was updated successfully, but these errors were encountered: