[eggjs/egg]egg-sequelize 不能正确的读取到 table model create 之后的返回实例的类型

2025-11-04 959 views
5

相关环境信息 操作系统: win 10 Node 版本:10 Egg 版本:2.6.1

回答

5

const user = await ctx.service.user.create(); ctx.logger.debug(user.get()); ctx.logger.debug('1234'); ctx.logger.info('1234'); // @ts-ignore ctx.body = { name, id: user.id, }; property id does not exit on type of 'Model<unknown, unknown>'

0

这个--没有大佬出来 说一下嘛

4

给个稳定复现的项目

4

https://gitee.com/wangyong1/cash.git

7

大佬,这个问题咋样了

1

现在看一下

3

这个是运行时创建的模型,ts 是分析不出来的。