Reputation: 5459
I am currently having issues adding proper type definitions to my project. I am very new to typescript and am following the guidance of a book (called ASP.NET Core and Angular 2) in order to become more familiar with it so I apologize if I my question lacks clarity at all. Anyway, in my index.d.ts
file, I am getting about 140 errors. A few of these errors which each show up many times are:
Cannot find name 'PropertyKey'. Property 'unscopables' does not exist on type 'SymbolConstructor'.
After some research, it looks like this may be a versioning issue however after playing with different versions of core-js
and typings
in my package.json
file, I am still unable to resolve the issue. Please see my below for m package.json
file:
{
"version": "1.0.0",
"name": "mylestone",
"private": true,
"dependencies": {
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/upgrade": "2.0.0-rc.5",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "^0.19.37",
"typings" : "^1.3.2",
"zone.js": "^0.6.12"
},
"devDependencies": {
"gulp": "^3.9.1",
"gulp-clean": "^0.3.2",
"gulp-concat": "^2.6.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-typescript": "^2.13.16",
"gulp-uglify": "^2.0.0",
"typescript": "^1.8.10"
},
"scripts": {
"postinstall" : "typings install dt~core-js --global"
}
}
All help is appreciated.
Upvotes: 1
Views: 49
Reputation: 4651
You shouldn't use typings
anymore, it's deprecated. install @types/core-js
as devdependency. I do expect that probably won't clear all issues around your codebases though, might need to adjust tsconfig as well correctly.
Upvotes: 2