Reputation: 2749
I am trying to get familiar with Angular2, TypeScript and ASP.NET 5. I am not very familiar with any of them so am following this tutorial:
https://www.youtube.com/watch?v=Zkesm9CUP_o&feature=youtu.be
My problem is that once I try to import from 'angular2/angular2' I am getting a build error in one of the Angular2 Typescript files.
So here is my folder structure:
Here is tsconfig.json
Here is gulpfile.js
and app.ts just contains the following:
import { Component, View, bootstrap } from 'angular2/angular2';
When I try to build, I get an error in di.d.ts. this is located in src\node_modules\angular2\src\core\metadata\di.d.ts
This is the error:
Error TS1110
Build: Type expected.
This is the line that the error refers to:
Any ideas why I'm getting this?
Upvotes: 1
Views: 2063
Reputation: 2851
Looks like there's an error in the type definition file. Change
token: this;
to
token: AttributeMetadata;
and it should compile.
EDIT: This is indeed a feature, as @Eric Martinez commented, called "Polymorphic this Typing". Updating to TypeScript 1.7+ fixes the issue.
Upvotes: 1