TypeError: Class constructor Model cannot be invoked without 'new'已解决

4,587 阅读1分钟

Koa中使用Typescriptsequelizecreate方法时遇到了TypeError: Class constructor Model cannot be invoked without 'new',经过多种尝试结果发现将tsconfig.json中的"target":"es5"选项改为"es6"即可。