【发布时间】:2016-12-13 14:17:10
【问题描述】:
当我在我的 Express 服务器上使用这一行时,它在 TypeScript 1.x 中运行良好
mongoose.Promise = global.Promise;
(mongoose.Promise = global.Promise;的用法来自the mongoose document)
更新到 TypeScript 2.x 后,它在终端显示此错误,并且不允许我启动服务器。
赋值表达式的左侧不能是常量或 只读属性。
我该如何解决这个问题?谢谢
【问题讨论】:
标签: express angular mongoose angular2-universal typescript2.0