3
タイピング設定を削除して、代わりに@typesを追加すると、プロジェクトのコンパイル中に一連のエラーが発生しました。どうやら@ types/core-jsはtypescriptコンパイラとVS IntelliSenseで見ることができます。ここVisual Studioでタイピングから@typesへの移動2015
多くのエラー
Severity Code Description Project File Line Suppression State
Error TS2304 Cannot find name 'Set'. TypeScript Virtual Projects C:\Projects\Cool\Project\node_modules\@angular\common\src\directives\ng_class.d.ts 46 Active
Severity Code Description Project File Line Suppression State
Error TS2304 Cannot find name 'Promise'. TypeScript Virtual Projects C:\Projects\Cool\Project\node_modules\@angular\common\src\pipes\async_pipe.d.ts 44 Active
セットとプロミスの一例は、コア - JS
後package.json構成によって定義される
"name": "Cool",
"private": true,
"scripts": {
"tsc": "tsc",
"tsc:w": "tsc -w"
},
"dependencies": {
"@angular/common": "~2.1.1",
"@angular/compiler": "~2.1.1",
"@angular/core": "~2.1.1",
"@angular/forms": "~2.1.1",
"@angular/http": "~2.1.1",
"@angular/platform-browser": "~2.1.1",
"@angular/platform-browser-dynamic": "~2.1.1",
"@angular/router": "~3.1.1",
"@angular/upgrade": "~2.1.1",
"@types/core-js": "^0.9.34",
"@types/mcustomscrollbar": "^2.8.30",
"angular-in-memory-web-api": "~0.1.13",
"animate.css": "3.5.2",
"bootstrap": "~3.3.5",
"core-js": "^2.4.1",
"es6-promise": "^4.0.3",
"es6-shim": "^0.35.1",
"font-awesome": "^4.6.3",
"jquery": "2.1.4",
"malihu-custom-scrollbar-plugin": "~3.1.5",
"material-design-iconic-font": "~2.2.0",
"moment": "^2.15.1",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.39",
"zone.js": "^0.6.25"
},
"devDependencies": {
"@types/node": "^6.0.45",
"typescript": "^2.0.6"
}
}
ここにはtsconfig.json
{
"compilerOptions": {
"target": "es5",
"noImplicitAny": false,
"noEmitOnError": true,
"removeComments": true,
"sourceMap": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./Scripts/app",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"allowSyntheticDefaultImports": true,
"jsx": "react",
"typeRoots": [
"./node_modules/@types"
]
},
"exclude": [
],
"files": [
"./Scripts/src/main.ts"
],
"compileOnSave": true
}
ヘルプが理解されます!
TypeScript 2を使用していることを確認しましたか? – TGH
@TGH、今朝私が最初にやったこと。私はTypeScript 1.8を持っています。私はそれをアップグレードし、私のコメントを投稿します。ありがとう –
はい!すべてが人の仕事をする時、人生は良いです! Visual Studio 2015用にtsc 2.0.6をインストールしました。プロジェクトを開いたとき、VSは私にtscの新しいバージョンに切り替えるように頼んだのです。ご注意いただきありがとうございます。 –