【发布时间】:2017-07-04 23:52:38
【问题描述】:
在发生这种情况之前,我在本机脚本项目上取得了不错的进展:
JS: EXCEPTION: Uncaught (in promise): ReferenceError: __assign is not defined
这是从这行代码冒出来的:
return [...state, { ...action.payload, success: false }];
这是我的tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true
},
"exclude": [
"node_modules",
"platforms",
"**/*.aot.ts"
]
}
Typescript 似乎没有在编译的源代码中包含它的帮助器 __assign 函数——这是他们实现对象扩展语法的方式。你们当中有没有人碰巧知道为什么?
【问题讨论】:
标签: typescript nativescript spread-syntax