【发布时间】:2021-02-18 07:57:19
【问题描述】:
我在一个项目中使用 Javascript,如果不使用 Typescript @UpdateDateColumn 装饰器,我无法弄清楚如何包含 updatedDate 列。
在打字稿中:
@UpdateDateColumn()
updatedDate: Date // works perfectly but unfortunately I am not using TS in this project
在 Javascript 中:
createdDate: {
type: 'timestamp', // works fine
},
updatedDate: {
type: 'timestamp', // throws error + everything else I have tried has also thrown an error.
},
【问题讨论】:
标签: javascript mysql sql typescript typeorm