Angular2 打字稿打字重复标识符
Angular2 Typescript Typings Duplicate identifier
看过其他帖子,但其中 none 的建议解决方案有效。
因此,即使我排除了整个 typings
文件夹,我仍然会看到这些重复的标识符错误。 typings
文件夹与 node_modules
和 bower_components
文件夹处于同一级别
根据 Angular 2 的建议,这是我的 typings.json:
{
"globalDependencies": {
"core-js": "registry:dt/core-js#0.0.0+20160317120654",
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654",
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
"node": "registry:dt/node#4.0.0+20160509154515"
}
}
我需要做什么? :(
PS:我为 Visual Studio 卸载了版本 1.8.6 的 TypeScript,只使用了 1.8.10 的 npm typescript。以前,它们一起安装在我的机器上,但仍然无法使用。
你的打字真的很奇怪,你应该有 es6-shim
或 core-js
,而不是两者。 node
很可能也是多余的。
就个人而言,我放弃了 VS 并使用 gulp 构建文件插入 angular。
您的排除不正确。假设您使用的是 Typings 1.0 或更高版本,根据您添加的屏幕截图,它应该看起来像这样。
"exclude": [
"node_modules",
"bower_components",
"typings/index.d.ts",
"typings/modules"
],
看过其他帖子,但其中 none 的建议解决方案有效。
因此,即使我排除了整个 typings
文件夹,我仍然会看到这些重复的标识符错误。 typings
文件夹与 node_modules
和 bower_components
文件夹处于同一级别
根据 Angular 2 的建议,这是我的 typings.json:
{
"globalDependencies": {
"core-js": "registry:dt/core-js#0.0.0+20160317120654",
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654",
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
"node": "registry:dt/node#4.0.0+20160509154515"
}
}
我需要做什么? :(
PS:我为 Visual Studio 卸载了版本 1.8.6 的 TypeScript,只使用了 1.8.10 的 npm typescript。以前,它们一起安装在我的机器上,但仍然无法使用。
你的打字真的很奇怪,你应该有 es6-shim
或 core-js
,而不是两者。 node
很可能也是多余的。
就个人而言,我放弃了 VS 并使用 gulp 构建文件插入 angular。
您的排除不正确。假设您使用的是 Typings 1.0 或更高版本,根据您添加的屏幕截图,它应该看起来像这样。
"exclude": [
"node_modules",
"bower_components",
"typings/index.d.ts",
"typings/modules"
],